http://qs321.pair.com?node_id=173007


in reply to Looking for Leaks in all the wrong places

If you are running Apache, you may find it nice to have a cron job that restarts it every 24 hours or so.

I've always did this because it sounded like a sensible thing to do, but it wasn't until recently I found out why :) We had a server which apache was never restarted because it sometimes forked a long running child process that would also be killed. As a "quick fix" the cronjob was turned off. Weeks later, the machine was out of memory and wierd things started happening due to it having 8 Apache child process each using 25-27 meg of memory.

Often debugging a memory leak isn't a viable option, the main use of this box was to run an app which is a big ball of mud and contains > 7,000 lines of frightening perl.

gav^

  • Comment on Re: Looking for Leaks in all the wrong places

Replies are listed 'Best First'.
Re: Re: Looking for Leaks in all the wrong places
by samtregar (Abbot) on Jun 10, 2002 at 03:16 UTC
    Better yet, use Apache::SizeLimit which can handle this problem automatically. Adam Robinson just added support for Apache::SizeLimit to Bricolage and the results have been impressive.

    -sam

      Yes, this is a perfect job for Apache::SizeLimit. And I'm not just saying that because I'm the maintainer. No one should run mod_perl without it (or its cousin Apache::GTopLimit).