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

Our Heroku app went down for a period of time yesterday. The error message in our logs:

[error] server reached MaxClients setting, consider raising the MaxClients setting

I checked the httpd.conf to see what the MaxClients setting was, and this is what I found:

MaxClients 1

The commit that added these directives is on Heroku's Github. Does there appear to be a rationale for a MaxClients setting of 1, or is it simply arbitrary? Are there any considerations I should make when increasing it?

share|improve this question
How did you change this parameter sir? – Burak Jan 30 '13 at 22:56
You fork the Heroku PHP Buildpack and edit the conf/httpd.conf file. – Brad Koch Jan 30 '13 at 23:01
up vote 2 down vote accepted

Heroku dynos are designed to be a single unit of computation. For comparison:

A single-threaded, non-concurrent framework like Rails can process one request at a time.

Setting MaxClients 1 is simply telling your PHP dyno to only handle its one request at a time. Since the dyno is actually capable of handling many more requests that that, MaxClients can and should be raised to a number much larger, such as 256.

share|improve this answer
256 is much too large. A Heroku dyno only has 512MB of memory. Each process probably uses 64MB, depending on what the memory_limit is in PHP.ini. So you should take 512 / 64 = 8 and set MaxClients and ServerLimit to that. Otherwise you run the risk of too many requests flooding the server and it spawning too many processes, possibly thrashing the disk or crashing. You can usually over-subscribe 20% because most requests don't take up all it's allocated RAM, so 10 is a good number. – Chloe May 24 '15 at 20:49

Here explaint mean MaxClients:

Try increase parameter about 250 and retry

share|improve this answer
I understand MaxClients is too low. I'm trying to understand the why - why is the default setting 1, and what implications does that entail for changing it? – Brad Koch Aug 9 '12 at 14:55
You'll have to ask whoever checked in the code. And the implications is that the server will only handle one simultaneous connection, which is very close to pointless. – Michael Hampton Aug 13 '12 at 21:09

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.