7

Starting php5-fpm appears to work, but checking the status immediately shows that it is not running:

[root@server ~]# service php5-fpm start
php5-fpm start/running, process 4516

[root@server ~]# service php5-fpm status
php5-fpm stop/waiting

Even though I am able to load PHP pages (meaning that PHP-FPM must be running), the status sometimes reports as stop/waiting.

It appears that there are processes running, but are these only the worker processes?

ps -aux |grep php
www-data  3552  0.0  0.7 338108 14960 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3553  0.0  1.3 338168 27156 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3554  0.0  1.1 337948 23020 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3555  0.0  1.0 334108 20644 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3556  0.0  1.1 337952 23032 ?        S    05:43   0:00 php-fpm: pool www 

I'm concerned that the master process is not working correctly. There is nothing being reported in the PHP-FPM log though.

[root@server ~]# tail /var/log/php5-fpm.log
[03-May-2014 06:19:32] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

Is service php-fpm status misreporting? Or is the master process actually stopped?

UPDATE: Rebooting the server causes PHP-FPM to start on boot and show as running, but issuing the reload or restart command causes it to go into the state described above. In it's current condition, I have to reboot the server every time I change php.ini. The server is Ubuntu 14.04

Nick
  • 4,433
  • 29
  • 67
  • 95
  • Thanks for the system restart trick! That helped me. But I'm not having the issue happen again when I restart php5-fpm. – Mark Jaquith Jun 08 '14 at 11:57

3 Answers3

14

It's a confirmed Bug in Ubuntu's PHP-FPM. For me, the following helped:

  1. sudo service php5-fpm stop
  2. ps aux |grep php
  3. kill [list of proccess IDs echoed by the command above]
  4. sudo service php5-fpm start
Quoting Eddie
  • 241
  • 2
  • 4
1

I had this exact same problem and for me it turned out to be a typo in one of the nginx configuration files. I had tried to comment something out in

/etc/php5/fpm/pool.d/www.conf

With a : instead of a ;

Billy
  • 111
  • 2
  • Configuration can be tested for syntax errors like this! `nginx -t` and `php5-fpm -t` – emc Nov 10 '15 at 20:50
0

I faced the same issue when trying to add a new conf file in fpm pool directory. Didn't realize that I'm using the same .sock name for two files. Just verify:

listen = /var/run/[NAME].sock
moe3144
  • 1
  • 1