On Fri, 7 Sep 2001, Jon Molin wrote:

> Hi list,
>
> I have a memory leak in a script or module, the problem is that i've
> resently added many scripts and modules and can't easily isolate the
> problem. Is there a way besides strace to see what the httpd process is
> up to?
>  9869 httpd      0   0 21188  19M  2424 S       0 12.2  3.8   0:13 httpd
> doesn't help me too much...

Please explain what do you mean by 'what the httpd process is up to'?

It's not an easy task to find the offending code that causes memory leaks.
Using GTop.pm for easier memory debugging printing helps a lot,
Devel::Peek is useful too, try also Devel::Leak and their Apache::
friends: Apache::Peek and Apache::Leak. You can find some notes on using
these in the mod_perl guide. Apache::VMonitor can be very useful too.

Otherwise you will probably have to play the halving game: remove half of
your modules/scripts and test. If nothing comes up return a half  of the
removed half, and so on. It's not always working like that, since some
code may leak when it interacts with some specific code.

In the meantime, use Apache::SizeLimit to prevent the processes from
growing. See the guide or the manpage for the details.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Reply via email to