I am running nginx + php5-fpm. My server usually is very fast but today I noticed that from time to time website "stucks" for 10-20 seconds. Not always, but sometimes it ends with 502 Bad Gateway error.

I investigated logfiles and founf the following: 1) (nging logfile) connect() failed (110: Connection timed out) while connecting to upstream 2) (php5-fpm logfile) [16-Feb-2013 01:20:53] WARNING: [pool www] server reached pm.max_children setting (5), consider raising it.

It's strange because today I have not much users online. Sometimes I have 2x more but everything works fine. Does anyone know how to increase pm.max_children setting? I checked /etc/php5/fpm/php-fpm.conf file but there is nothing like "pm.max_children setting".

2 Answers 2


I found it at last:


You'll find pm.max_children in your pool configuration file in the /etc/php-fpm.d/ directory. The default file is www.conf which configures the first and default pool.

  • I don't have this directory Feb 16, 2013 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .