For 2 days solid now I've been trying to track down a very bizarre memory
leak in AxKit.

I've checked everything I can think of - all circular references are now
gone, all closures clean up carefully after themselves, and I've reduced
the usage of some external modules. But still the processes grow.

Now to the wierd bit. I could track this down if it wasn't for this:

The memory leak starts after the Nth hit, usually around 35. This is
running under httpd -X.

So it goes along very happily for 35 hits - memory usage is rock solid
stable. Then after the 35th hit the memory usage starts to grow about 4k
per hit. Obviously thats an impossible rate of growth to sustain for any
amount of time, and soon the server is swamped.

Can anyone give me _any_ help in figuring out where this might be coming
from? I've tried several things, including adding the ability to display
the memory usage in the debug statements (by getting the VmSize out of
/proc/self/status). This is driving me absolutely mad, as you might
tell. The only thing I can come close to in locating it is some remote
possibility that it is in one particular section of the code, but that
doesn't actually seem to be the case - sometimes the memory increase goes
outside that section of code.

The modules I'm using are:

Time::HiRes, Apache::* (core apache stuff only), AxKit, Digest::MD5,
Compress::Zlib, Fcntl, XML::Parser, XML::XPath, Unicode::Map8,
Unicode::String, MIME::Base64, Storable (loaded but not used),
XML::Sablotron (loaded but not used).

mod_perl is 1.24 and Perl is 5.00503 (Mandrake release).

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to