Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web farm that uses Apache 2.2.15 and mod_perl-2.0.4. I need to know if there is a comparable perl module to Apache::GTopLimit for mod_perl-2.x.

I have searched Google and other sites, and have not found anything yet. What I need to do is limit the amount of memory any one worker can consume. If it exceeds the threshold, then I want the worker to die.

I have already set the MaxRequestsPerChild value, but that does not prevent a worker from eating up all the memory on the box.

share|improve this question

If you've got Apache worker processes running away with all your memory in mod_perl, you've probably got bigger issues with your underlying application code. You shouldn't need to be cycling Apache workers that manually, unless your ratio of requests to workers is very low - in which case, adjusting that ratio by decreasing the number of workers might help with your issue.

All that aside, is there anything stopping you from just apachectl graceful-ing Apache every n hours? This terminates all the existing Apache workers as soon as they become idle, spawns new ones; it's a very direct-action approach to managing the worker processes, if fixing the underlying mod_perl issue isn't an option.

share|improve this answer

For workers that are separate process, ulimit would work at stopping their memory growth.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.