[php-maint] php-fpm service script

Rovanion Luckey rovanion.luckey at gmail.com
Fri Aug 29 11:33:27 UTC 2014


Hi,
I'm running Wheezy and am working on hosting a site using php-fpm. The
problem is that if something goes wrong during reload fpm immediately dies
and nothing is reported to the user. Here is what I do and what is written
in the log:

┌[cydadmin][web][ssh]:~
└$ sudo service php5-fpm reload
[ ok ] Reloading PHP5 FastCGI Process Manager: php5-fpm.
┌[cydadmin][web][ssh]:~
└$ sudo service php5-fpm status
[FAIL] php5-fpm is not running ... failed!

[29-Aug-2014 13:18:21] NOTICE: fpm is running, pid 3910
[29-Aug-2014 13:18:21] NOTICE: ready to handle connections
[29-Aug-2014 13:22:16] NOTICE: Reloading in progress ...
[29-Aug-2014 13:22:16] NOTICE: reloading: execvp("/usr/sbin/php5-fpm",
{"/usr/sbin/php5-fpm", "--fpm-c\
onfig", "/etc/php5/fpm/php-fpm.conf"})
[29-Aug-2014 13:22:16] ERROR: [/etc/php5/fpm/pool.d/y-lan.se.conf:2]
unknown entry 'error.log'
[29-Aug-2014 13:22:16] ERROR: Unable to include
/etc/php5/fpm/pool.d/y-lan.se.conf from /etc/php5/fpm/\
php-fpm.conf at line 2
[29-Aug-2014 13:22:16] ERROR: failed to load configuration file
'/etc/php5/fpm/php-fpm.conf'
[29-Aug-2014 13:22:16] ERROR: FPM initialization failed

The problem seems to be that:

1. Reload doesn't sanity check the config file before loading it.
2. The init script doesn't report failure on crash.
3. The init script even reports success if php-fpm isn't running.

┌[cydadmin][web][ssh]:~
└$ sudo service php5-fpm status
[FAIL] php5-fpm is not running ... failed!
┌[cydadmin][web][ssh]:~
└$ sudo service php5-fpm reload
[ ok ] Reloading PHP5 FastCGI Process Manager: php5-fpm.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20140829/67d55473/attachment.html>


More information about the pkg-php-maint mailing list