May 04, 2016 07:50AM
Hello,

On May 4, 2016, at 7:12 AM, Sem9999 <nginx-forum@forum.nginx.org> wrote:

> Hi,
>
> I am trying to connect to my AWS RDS (mysql) instance using the AWS supplied
> DNS endpoint.
>
> The problem is, the IP of the instance changes periodically.
>
> It appears that nginx does not resolve the DNS name every time, but caches
> it.
>
> Therefore nginx initially works, then at some point later, things break.
>
> How can I turn off the DNS caching?

Add a "valid" parameter to your resolver directive:

resolver 127.0.0.1 valid=5s;

This would set it to cache 5s.

http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver

--
Jim_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to turn off DNS caching

Sem9999 May 04, 2016 07:12AM

Re: How to turn off DNS caching

Jim Ohlstein May 04, 2016 07:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready