0

I'm serving files with Apache and PHP-FPM via FCGI.

When I run yum update on a live server, what happens when PHP gets updated?

I can imagine three scenarios:

  • php-fpm is stopped, then restarted after the package has been updated
  • php-fpm keeps using the previous PHP version until it's restarted
  • php-fpm keeps running and switches PHP versions on the fly, potentially even in the middle of executing a script (e.g. running a script with the old version, and an include with the new version)

Which of these reflects what actually happens?

  • You've given little information about your distribution. One can only guess that it's RPM-based (due to yum). – sam_pan_mariusz Feb 25 '15 at 17:16
0

As far as I can tell from the .spec file, php-fpm will be restarted, meaning any running processes will be stopped. See https://github.com/remicollet/remirepo/blob/master/php/php56/php56.spec

0

To be more predictable, I'd strongly suggest against running yum update on live server, instead you should create non-php maintenance page and serve that while you're updating php and then switch back to your php application once you're done and restart php-fpm as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.