Re: Memory/cpu quoatas for users
On Thu, Feb 08, 2001 at 09:35:21AM +0000, Mike Moran wrote:
>
> Hi. I am looking for a way to limit the amount of memory and cpu used by
> the apache
> daemon, since the web machine is very resource-limited. I know I can
> reduce the
> maximum number of servers, but that doesn't limit usage by each server.
if you are using mod_perl, then you might want to use one of the
modules Apache::SizeLimit or Apache::GTopLimit, which are dedicated to
automatically killing excessively growing apache child processes.
You'll find them on CPAN:
http://search.cpan.org
Also, you might want to browse the archives of the mod_perl mailing
list. Excessive memory usage and how to deal with it is one of the
topics that keep popping up there regularly ;)
http://perl.apache.org/#maillists
Good luck,
Erdmut
> Perhaps a
> default "nice" level would also help. How do you set the default nice
> for a user?
>
> The thing is, would either of these stop something like a while(true)
> loop, which allocated memory? I've been making some changes to the
> apache daemon mod_perl setup recently and I end up being locked out
> because something swamps out the system. I get `half-connects' where,
> for instance, ssh/telnet connects but then just sits there until it
> times out. This sounds exactly like a thrashing problem. I had a top
> running and kswapd
> seemed to be the last thing I saw before it hung.
>
> Maybe this is a kernel level thing? Is there something like a
> high-watermark process killer that I could use, ie something which
> started rampaging around when memory usage crept above a certain level?
>
> Note that I think the problem will probably settle out once I've stopped
> making so many
> changes to the apache setup but, for now, it is a pain to have to ask
> for my machine to be
> powercycled. Regardless, it would be nice to know I have a safety net,
> just in case.
>
> Thanks,
>
> --
> Mike
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
Erdmut Pfeifer
science+computing gmbh
-- Bugs come in through open windows. Keep Windows shut! --
Reply to: