Welcome! Log In Create A New Profile

Advanced

Re: How to turn off DNS caching

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: 81
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready