Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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".

share|improve this question

I found it at last:

share|improve this answer

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.

share|improve this answer
I don't have this directory – user1821484 Feb 16 '13 at 10:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.