We are using nginx as proxy server in all our production deployment. The
nginx server proxy the http request to Amazon ELB (elastic load
balancer) using upstream module. Currently we are seeing timeout issues
in NGINX because NGINX caches the IP address on start. Now when there is
change in IP address of ELB, NGINX doesn’t updates it’s IP and still
point to old IP. We went through many post on internet and tried setting
resolver to AWS DNS server, resolver timeout to 20s, valids to 30 sec.
defining variable instead of direct name in proxy pass, request URL in
proxy pass but nothing has worked for us. NGINX is not honoring the
resolver and corresponding TTL settings.
Some of the blogs also says that they have tried similar things and
nothing works for them. IT looks to me like this is bug in NGINX and
will be resolved only by changing the source.
Has anybody found solution to this problem? If yes, please let us know
Only solution I have right now is write some script and restart the
server when timeout occurs. But this is not ideal solution.
I am seriously thinking of moving to Apache Http server if this problem
doesn’t get resolved.