On Wed, 2012-02-22 at 14:05 +0000, francis picabia wrote:

> Hello,
> 
> One of the most frustrating problems which can happen in apache is to
> see the error:
> 
> server reached MaxClients setting
> 
> After it, the server slowly spirals down.  Sometimes it mysteriously recovers.
> This is difficult to diagnose after the problem appeared and went away.
> 
> What have we for advice on :
> 
> a) diagnosis of the cause when the problem is not live
> b) walling off the problem so one bad piece of code or data does not
> effect all sites hosted on same server


To diagnose it, enable server-status - this gives you a URL in apache
where you can see how many workers are busy, how many requests are being
served etc. You want to tie this into your monitoring system.

As for increasing capacity you need to read the docs for the MPM worker
you're using - for example:
http://httpd.apache.org/docs/2.2/mod/prefork.html for the pre-forking
server.


> 
> Obviously a Virtual Machine could handle item b, but I am hoping for
> something interesting on the apache side.  Obviously there is
> increasing the limit, but this is typically not the solution - the real
> problem for apache is bad code or data outside of what the code
> can digest in a timely manner).
> 
> One tip I've seen suggested is to reduce the apache timeout from 120
> seconds down to 60 seconds or so.
> 
> 


Reply via email to