Php-fpm getting a “failed” message, but the processes start — ok

PHPphp-fpm

I'm having a strange issue where when I start php-fpm, I get the following message:

> /etc/init.d/php-fpm start

Starting php-fpm ................................... failed

But when I look at the log file it looks like everything is decent (I changed the output to debug)

Oct 28 21:25:28.434246 [DEBUG] pid 19872, fpm_event_init_main(), line 93: libevent: using epoll
Oct 28 21:25:28.434392 [NOTICE] pid 19872, fpm_init(), line 50: fpm is running, pid 19872
Oct 28 21:25:28.435346 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19873 started
Oct 28 21:25:28.436182 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19874 started
Oct 28 21:25:28.437047 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19875 started
Oct 28 21:25:28.437897 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19876 started
Oct 28 21:25:28.438751 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19877 started
Oct 28 21:25:28.439637 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19878 started
Oct 28 21:25:28.440512 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19880 started
Oct 28 21:25:28.441385 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19881 started
Oct 28 21:25:28.442252 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19882 started
Oct 28 21:25:28.443391 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19884 started
Oct 28 21:25:28.443551 [NOTICE] pid 19872, fpm_event_loop(), line 111: ready to handle connections

The processes exist and seem to be handling things ok. Any reason why it should give me a failed message?

Best Answer

Worth mentioning a fix for the problem with the .....failed error encountered during a fresh install of PHP-FPM even if Daniel has solved his own problem.

The php-fpm.conf file has a pid file directive that is commented out in a new install. Remove the ';' to write the pid file and the start command shouldn't have problems locating the pid file in the default location.