httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: getting rid of 'server reached MaxClients setting' error
Date Wed, 28 Apr 2004 14:33:13 GMT
Stas Bekman wrote:
> I think this misleading error is really a bug in Apache:

I agree.

> [Mon Apr 26 15:28:44 2004] [error] server reached MaxClients setting, 
> consider raising the MaxClients setting
> It sounds like a one-off bug to me. It reports that error when the 
> number of workers is the same as MaxClients, 

it's worse than that, I think.

>    which is perfectly fine. It 
> should only report a problem when a new request is coming in and there 
> are no free servers/threads to handle the request.

I've seen this recently while experimenting with event driven I/O built on top 
of the worker MPM.  It seems to happen when the parent is trying to increase the 
number of child processes but they haven't initialized yet and the server is 
temporarily out of worker threads.  I didn't see the number of active workers 
reach MaxClients.  Re-examining the test that leads to the message:

     else if (idle_thread_count < min_spare_threads) {   <== cool
         /* terminate the free list */
         if (free_length == 0) {                         <== insufficient

I'm a little rusty on this code, but looks like free_length is increased when 
the code finds a process with at least one worker thread with SERVER_DEAD state 
in the scoreboard.  I don't see where it checks for MaxClients.


View raw message