Question

problem with php5-fpm on Nginx

  • Posted on January 27, 2014
  • finidAsked by finid

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?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 - https://github.com/AbhishekGhosh/Nginx-PHP5-FPM-Restart-Fix-on-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. https://github.com/gplessis/dotdeb-php5/issues/45

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.