resolver does not re-resolve upstream servers after initial cache

guilhem nginx-forum at
Thu Nov 8 11:07:04 UTC 2012

Dave Nolan Wrote:
> >> However, this is not happening: I can watch tcpdump -n udp port 53
> but I
> >> see no re-resolution taking place.
> >>
> >> I'd love to know how to fix this. Any advice appreciated thanks!
> >
> > proxy_pass$request_uri;
> >
> > will resolve "" dynamically (assuming of course there's
> > no "upstream" in configuration).
> Thanks very much for your help.
> If I switch to using directly in the proxy_pass, I lose
> the
> flexibility of server groups. Is there any way of dynamically
> re-resolving servers in upstream server group?


I can add that I lost my production servers last night because of this

* I use dynamic dns name for flexibility for almost all my servers
* I put one backend server to maintenance so the name was removed by dns
(after a TTL)
* corosync manage my nginx servers... and can restart them.

You can easily understand what append : 
corosync detect a problem, fail back to another server, restart nginx but
nginx can't resolved a backend host in upstream so it failed to start (with
"[emerg] host not found in upstream").

All my nginx servers have been down because of this.

Just like you, I can't remove my server groups but I want the flexibility of
DNS resolving (Not failing at start and TTL).

Guilhem Lettron
Youscribe -

Posted at Nginx Forum:,232585,232596#msg-232596

More information about the nginx mailing list