problem with php5-fpm on Nginx

  • Posted January 27, 2014

I have php5-fpm running with nginx. Here’s my problem with php5-fpm:

If I try to reload/stop the daemon, I get a “reload: unknown instance” or “stop: unknown instance.” But there’s a php5-fpm init script.

If I try to restart it, I get:

<pre> stop: Unknown instance: php5-fpm start/running, process 12915 </pre>

Trying to start it just gives “php5-fpm start/running, process 13011.”

The output of “ps aux | grep -i php5-fpm” shows nothing, but “ps aux | grep -i php-fpm” shows three php-fpm processes running.

Does anybody know why php5-fpm is respondsing in this fashion?

To solve easy you must to modify the /etc/init/php5-fpm.conf and edit

reload signal USR2

reload signal USR2

What exactly are you changing?

@akehat it seems, he uncommented that line!

@akehat your solution fixed my problem

Hi At some case reboot wont fix the issue at that time modify the init script which is located in /etc directory.

This is a bug in the upstart init script in ubuntu package

To solve easy you must to modify the /etc/init/php5-fpm.conf and edit

#reload signal USR2


reload signal USR2

Al the best…

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It worked for me ! root@prod:/etc/nginx/sites-available# service php5-fpm restart stop: Unknown instance: php5-fpm start/running, process 11948 root@prod:/etc/nginx/sites-available# vim /etc/init/php5-fpm.conf

uncomment that line root@prod:/etc/nginx/sites-available# service php5-fpm restart php5-fpm stop/waiting php5-fpm start/running, process 11967

Many Thanks ! :D

Vishal Arora

I have a GitHub repo to fix it for Ubuntu -

Some work needed on /etc/init.d/php5-fpm && /etc/php5/fpm/php-fpm.conf. All is written there. It is for Ubuntu 13, 14 etc. You possibly need a bit modification.

The problem has reappeared on Nov 2014, hence this fix. Editing only /etc/php5/fpm/php-fpm.conf (or creating php5-fpm.override) will not radically fix it now. It is marked as known bug now.

OP’s OS is not latest Debian for sure.

This problem reappeared in the 5.6.1 packages for wheezy.

Commenting out the reload signal USR2 line in /etc/init/php5-fpm.conf fixes the problem.

Or you can copy php5-fpm.conf to php5-fpm.override without this line and prevent this issue next time.

Worked for me, thanks!

Ok, rebooting seems to have fixed whatever the problem was. <br> <br>Thanks.

I meant to ask how you installed php5-fpm, not the OS itself.

Installed the OS from the DO dashboard, and, no, I have not rebooted yet. Will do that later tonight.

That means it’s crashing or failing to start. Try rebooting your droplet—does that fix it? <br> <br>If not, how did you install php5-fpm and what OS are you using?