How to wait for upstream server to start

kevin gill kevin at movieextras.ie
Wed Feb 24 01:03:04 MSK 2010


I am running a low traffic site using nginx. I use one upstream
multi-threadded server to serve the content. I use the proxy module to
forward the requests.

Occasionally, I need to restart the upstream server. I takes 20-30 seconds
to startup.

I want requests to queue until the server is started, i.e. configure a 30
second timeout before I get the "502 Bad Gateway" response.

I am running nginx/0.7.64 on ubuntu.

Is there an nginx configuration option to make it wait until and retry
while the server restarts? Alternatively, is there another product I
should put in the middle between nginx and my upstream server which
provides this functionality.

Thanks,

Kevin




More information about the nginx mailing list