Answer the question
In order to leave comments, you need to log in
When performing a full restart of apache2 in nginx+apache2, how to add a timeout for new connections?
Question for nginx experts.
There is a bunch of nginx + apache2 Have to
restart apache2. And this has to be done not with the help of graceful, but with a stop and restart.
Can it be done like this?
If Apache is turned off, then for all new connections, nginx would try to connect to Apache for 15 seconds. If it did not work out, then let it be Bad gateway. And if Apache became available, then everything starts working as before.
How I tried to set it all up.
Turned off apache, thereby simulating the stop phase of apache2, and started configuring nginx. Wanted to achieve that at request for it there was some timeout.
Tried the proxy_connect_timeout setting -Defines a timeout for establishing a connection with a proxied server.
Put 60s. But everything crashes in 5xx in a second. It seems that if the port does not obey, then this is not even establishing? :)
proxy_read_timeout - not suitable. There should already be a successful connection.
proxy_send_timeout - similar.
I thought to apply these parameters somehow:
proxy_next_upstream
proxy_next_upstream_timeout
proxy_next_upstream_tries
It didn't work either. :(
Is there any solution for nginx or is there a solution using some other product?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question