You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Khai Doan <kh...@hotmail.com> on 2006/03/01 00:36:55 UTC

[users@httpd] How to limit the size of each apache child process

Hi list,

I am running apache 2 using prefork model, and wish to limit the size of 
each apache process.  After a request, it should check its size, and if 
exceed a certain threshold, terminate itself.  I have looked at RLimitMEM 
directive, but it says that this directive only apply to subprocess (CGI) 
launch by apache child, and not the apache child itself.  So, how can I do 
this without using mod_perl ?

Thanks
Khai



---------------------------------------------------------------------
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] How to limit the size of each apache child process

Posted by Joshua Slive <jo...@slive.ca>.
On 2/28/06, Khai Doan <kh...@hotmail.com> wrote:
> Hi list,
>
> I am running apache 2 using prefork model, and wish to limit the size of
> each apache process.  After a request, it should check its size, and if
> exceed a certain threshold, terminate itself.  I have looked at RLimitMEM
> directive, but it says that this directive only apply to subprocess (CGI)
> launch by apache child, and not the apache child itself.  So, how can I do
> this without using mod_perl ?

I don't think that can be done without some OS-specific C code and
possibly a new mpm.  You can set the rlimitmem under which apache
itself operates, but that will just kill off processes in the middle
of serving if they exceed the limit.

Joshua.

---------------------------------------------------------------------
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