Re: getting rid of 'server reached MaxClients setting' error

2004-05-03 Thread Stas Bekman
Since I get no further feedback, I'm going to commit this soon, unless someone 
objects/comments on it.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: getting rid of 'server reached MaxClients setting' error

2004-04-28 Thread gregames
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.

Greg


Re: getting rid of 'server reached MaxClients setting' error

2004-04-28 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
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.
Thanks, Greg. Am I right to say that you now have an itch to scratch and get 
it solved? :)

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com