Giter Site home page Giter Site logo

PHP-FPM reload about deb.sury.org HOT 15 CLOSED

oerdnj avatar oerdnj commented on July 30, 2024
PHP-FPM reload

from deb.sury.org.

Comments (15)

oerdnj avatar oerdnj commented on July 30, 2024

Not sure which php version you are running, but since you are running on Ubuntu 14.04 you can uncomment the "reload" stanza in /etc/init/php5-fpm.conf, e.g. the file should look like this

# php5-fpm - The PHP FastCGI Process Manager

description "The PHP FastCGI Process Manager"
author "Ondřej Surý <[email protected]>"

start on runlevel [2345]
stop on runlevel [016]

reload signal USR2

pre-start exec /usr/lib/php5/php5-fpm-checkconf

respawn
exec /usr/sbin/php5-fpm --nodaemonize --fpm-config /etc/php5/fpm/php-fpm.conf

There's a compatibility problem with older upstart (unknown directives causes upstart to barf), so it's commented out by default.

I'll let this open and think about a better way how to detect correct upstart version and uncomment this by default.

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

I'm using latest version of PHP 5.5. However I really need reload since I don't want to kill current php processes that are running when new version of app is deployed.

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

I did uncomment of that line. Now it throws:

reload: Unknown instance:

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

Could you restart the service before reloading it?

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

Output:

root@ip:~# service php5-fpm restart
stop: Unknown instance:
php5-fpm start/running, process 29819
root@ip:~# service php5-fpm reload
reload: Unknown instance:

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

It seems there's some error in upstart :(.

Try stopping the service, then killing all remaining php5-fpm processes and then start it again...

Seems like that might help:

http://stackoverflow.com/questions/19998526/ubuntu-php5-fpm-throws-unknown-instance-on-reload

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

I see they have it reported https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1242376

But cannot believe that this is opened for 9 months and no fix.

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

It's not that easy to fix, since you need to care about upgrades from previous versions and that's when it breaks.

Fortunately I don't have to care about that - so I have prepared fix for the reload on upstart 1.10+

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

Any idea when new version of upstart will be released?

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

The 14.04 already has a upstart 1.12.1, but the problem is:

  1. you start upgrading from Ubuntu 12.04 LTS that has upstart 1.5
  2. you upgrade to php5-fpm with 'reload' command
  3. the upgrade breaks since the postinst scripts barfs on 'reload' command that upstart 1.5 doesn't know about

The solution would be:

  1. Install new upstart from Ubuntu 14.04
  2. Reboot server
  3. Install everything else

And you can see that's not going to fly... You want an upgrade to finish in one run.

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

I have freshly installed 14.04 on AWS and this is happending, I didn't upgrade from 12.04.

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

I understand, but your problem could be easily solved by uncommenting the 'reload' line in /etc/init/php5-fpm.conf.

The upgrade problem (that is different from yours) cannot be solved that easily. Thus they are not going to fix the problem in official Ubuntu packages.

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

I did uncomment that line, but still it doesn't work.

from deb.sury.org.

oerdnj avatar oerdnj commented on July 30, 2024

php5/5.5.14-2~+1 should be available from ppa:ondrej/php5 now with a patched FPM that accepts SIGHUP.

from deb.sury.org.

majksner avatar majksner commented on July 30, 2024

Thanks!
On Jul 2, 2014 2:42 PM, "Ondřej Surý" [email protected] wrote:

php5/5.5.14-2~+1 should be available from ppa:ondrej/php5 now with a
patched FPM that accepts SIGHUP.


Reply to this email directly or view it on GitHub
#1 (comment).

from deb.sury.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.