Stas Bekman wrote:
> 
> 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'?
> 

sorry, what i meant was what script was accessed by the httpd process.
That's the first problem, locating what set of scripts(modules) it can
be and after that start looking...


> 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.

ok, i'll look into that. I've been using RLimitMEM and RLimitCPU in
httpd.conf:
RLimitMEM 15728640      15728640 
RLimitCPU 600   600
and haven't got them to work very good:
10314 httpd     13   0 67824  66M  5572 R       0 17.9 13.1   4:19 httpd
10313 httpd     13   0 69984  68M  5580 R       0 17.7 13.5   4:33 httpd

but i guess that's fairly OT on the mod_perl list. 

Thanks for the quick reply!
/Jon

> _____________________________________________________________________
> 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