[KLUG Members] Apache: Limit the amount of RAM used by a child/altogether.

Adam Williams members@kalamazoolinux.org
Fri, 10 Oct 2003 09:08:43 -0400


> For Slashdot, we dropped this in our httpd.conf:
>     <Perl>
>     use Apache::SizeLimit;
>     $Apache::SizeLimit::MAX_PROCESS_SIZE = 75000;
>     $Apache::SizeLimit::MAX_UNSHARED_SIZE = 75000;
>     </Perl>
>     PerlFixupHandler Apache::SizeLimit

Does this work for all apache threads or just ones directly involving
executing stuff in the context of mod_perl?

> Also, of course, it only works if you already have mod_perl compiled
> in;  if not, adding it is surely more bloat than this is worth.
> Do 'perldoc Apache::SizeLimit' for info.

Did you try just making ulimit calls in /etc/rc.d/init.d/httpd (or your
distor's equivalend)?