Enqueue incoming connections while PHP restarts

Hello,

it is currently possible to restart nginx without losing any incoming
connections. See

But what if I have to restart PHP? Is it possible to let nginx enqueue
incoming connections while PHP is restarting?

Kind regards
Steffen W.

2009/12/6 Steffen W. [email protected]:

it is currently possible to restart nginx without losing any incoming
connections. See
CommandLine | NGINX

But what if I have to restart PHP? Is it possible to let nginx enqueue
incoming connections while PHP is restarting?

Hi,

At my site I do this with two servers, A and B load-balanced with
haproxy:. Under normal conditions, traffic is served both on A and B.
Then when it’s time to restart your app, this is what I do:

  1. soft-stop nginx on A, current requests will be properly honored,
    and haproxy will route new requests to B
  2. restart your app
  3. start nginx, haproxy will route traffic back to both A and B

Once this process is applied on A, do the same on B, in sequence.

Jean-Baptiste Q.