php-fpm stops responding

Reinis Rozitis r at
Tue Jul 13 12:16:12 MSD 2010

> I figured this would be the first place to start, how do I spawn more
> children for php?

If you want FPM to do it you need to use the dynamic spawning then ( edit 
php-fpm.conf ).

pm = dynamic

and change the following settings to your needs:


Otherways if you use 'static' process manager just increase pm.max_children 

The error_log should even contain some information if there is a need to 
tune theese params.
Example output:

Jul 12 20:14:20.869487 [WARNING] [pool www] seems busy (you may need to 
increase start_servers, or min/max_spare_servers), spawning 32 children, 
there are 0 idle, and 66 total children
Jul 12 20:14:21.872523 [WARNING] [pool www] server reached max_children 
setting (70), consider raising it

> I would like to track down the offending script as well - how do I use
> the  items that were talked about above?

request_terminate_timeout = 60s
request_slowlog_timeout = 20s
slowlog = /path/slow.log

slow.log then will have backtrace of which script and what part of it takes 
too long (in this case 20 seconds).

You can check - while the 
documentation is for the old style XML configuration the variables are still 
the same.


More information about the nginx mailing list