unwrecker2013-05-30 10:51:29
unwrecker, 2013-05-30 10:51:29

502 Bad Gateway during php5-fpm restart

Is there a way to make nginx wait a while while the upstream is down instead of throwing a 502 error?

This doesn't help:

    keepalive_timeout 600;
    send_timeout 600;
    proxy_send_timeout 600;
    proxy_read_timeout 600;
    fastcgi_read_timeout 600;
    proxy_connect_timeout 600;

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Puma Thailand, 2013-05-30

The easiest way is to use two php-fpm on different ports, update the code in one directory, switch nginx to another port and make it reload
. And in nginx reload works without dropping clients.
business set to 30 minutes.

Evengard, 2013-05-30

The point here is not what to wait / not to wait, but that the OS immediately gives a whack, because the socket cannot connect - the php-fpm port has not yet been bound. So in general, except for perversions with error_page, I'm afraid not

max_mara, 2013-05-30

Alternatively, you can set a custom error_page, which will be automatically updated after some time.

gaelpa, 2013-05-30

Is reload (SIGUSR2) not enough in your case?
>> graceful reload of all workers + reload of fpm conf/binary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question