You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Damian Montaldo <da...@gmail.com> on 2009/12/16 20:07:57 UTC

[users@httpd] MaxRequestsPerChild limit is never reached

Hi! I have a little doubt.

I've setup MaxRequestsPerChild to 10000. But when I check how many
requests a child served, it never gets to that number, intstead seems
to die earlier. Is there some kind of 'idle time' or something?

I've looked into the prefork.c and it was too big for me. Any suggestions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MaxRequestsPerChild limit is never reached

Posted by André Warnier <aw...@ice-sa.com>.
Damian Montaldo wrote:
> On Wed, Dec 16, 2009 at 4:14 PM, Eric Covener <co...@gmail.com> wrote:
>> On Wed, Dec 16, 2009 at 2:07 PM, Damian Montaldo
>> <da...@gmail.com> wrote:
>>> Hi! I have a little doubt.
>>>
>>> I've setup MaxRequestsPerChild to 10000. But when I check how many
>>> requests a child served, it never gets to that number, intstead seems
>>> to die earlier. Is there some kind of 'idle time' or something?
>>>
>>> I've looked into the prefork.c and it was too big for me. Any suggestions?
>> MaxSpareServers?
> 
> <IfModule prefork.c>
> StartServers 150
> MinSpareServers 5
> MaxSpareServers 20
> ServerLimit 250
> MaxClients 200
> MaxRequestsPerChild 10000
> </IfModule>
> 
(Saving Eric some typing maybe)
(The following is all by the way in the on-line docs, see
http://httpd.apache.org/docs/2.2/mod/directives.html

 > StartServers 150
At start, Apache will start 150 children.

After a while, if they have nothing to do, Apache will start killing off 
some, in function of :

 > MinSpareServers 5
It will always leave at least 5 living ones, even if they have nothing 
to do.  Just so that if a few requests come in suddenly, it has a few 
children ready to server these requests.

 > MaxSpareServers 20
As more requests come in, Apache will start more children, to nhandle 
the increased present and future load.
But it will never leave more than 20 children doing nothing.

 > ServerLimit 250
That is the absolute maximum number of children it will ever start.  But 
read the doc at 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit

 > MaxClients 200
That is the maximum number of requests that will be processed at any one 
time. It slimit is ServerLimit.
But again, read the doc above.

 > MaxRequestsPerChild 10000
Independently of the above, any child that has handled 10000 requests 
already, will die.  But it could have been killed before by virtue of 
one of the directives above.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MaxRequestsPerChild limit is never reached

Posted by Damian Montaldo <da...@gmail.com>.
On Wed, Dec 16, 2009 at 4:14 PM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Dec 16, 2009 at 2:07 PM, Damian Montaldo
> <da...@gmail.com> wrote:
>> Hi! I have a little doubt.
>>
>> I've setup MaxRequestsPerChild to 10000. But when I check how many
>> requests a child served, it never gets to that number, intstead seems
>> to die earlier. Is there some kind of 'idle time' or something?
>>
>> I've looked into the prefork.c and it was too big for me. Any suggestions?
>
> MaxSpareServers?

<IfModule prefork.c>
StartServers 150
MinSpareServers 5
MaxSpareServers 20
ServerLimit 250
MaxClients 200
MaxRequestsPerChild 10000
</IfModule>

Thanks!

> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] MaxRequestsPerChild limit is never reached

Posted by Eric Covener <co...@gmail.com>.
On Wed, Dec 16, 2009 at 2:07 PM, Damian Montaldo
<da...@gmail.com> wrote:
> Hi! I have a little doubt.
>
> I've setup MaxRequestsPerChild to 10000. But when I check how many
> requests a child served, it never gets to that number, intstead seems
> to die earlier. Is there some kind of 'idle time' or something?
>
> I've looked into the prefork.c and it was too big for me. Any suggestions?

MaxSpareServers?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org