I'm running a fairly resource-heavy Magento-based site via a combination of Apache httpd, redis and php-fpm.

When I make changes to core PHP files, it's necessary to restart the above services to make sure no old code is cached which can (and does) screw up Magento.

In the past when I just used httpd, I simply ran service httpd graceful to gracefully restart without affecting site visitors, but now that I have to restart several services (and flush redis) the website is unavailable for a few seconds.

Is it possible to avoid this?

  • How do you think it is possible to restart server without going it offline?
    – Alexiy
    Sep 1, 2016 at 5:42
  • @Alexiy: New process inherits the listen FDs and immediately starts accepting new connections, while old process continues handling existing connection FDs until all of them finish. Sep 1, 2016 at 7:50

1 Answer 1


If you look a the Apache documentation you'll see that Apache uses the USR1 signal for this. As such it's a custom routine. You'll have to check the documentation of the other components to see whenever or not they offer similar options. One hit for php-fpm is e.g. Can we reload one of the PHP-FPM pool without disturbing others.

If one of the components doesn't have such an option you won't be able to do it with a single server/site. You'd need to some kind of cluster or balancer which would allow you to redirect your users to the new version and turn off the old version after some time. An alternative might be schedule the restart for some low traffic time (e.g. during the night).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .