Hi. I'm working on making Bugzilla support mod_perl.
I have a very strange memory leak.
Bugzilla uses the Template Toolkit (TT2).
We're using MP2. In particular, 1.999022 (aka 2.0.0-RC5). I've also
tested the below on 2.0.1, with the same results.
I have httpd-2.0.52-22 from RHEL4 (Red Hat Enterprise Linux 4) for my
Apache. My perl is also 5.8.5, from RHEL4. (The server is a RHEL4
server.)
All my testing was in a single-process prefork server, running as
"httpd -X".
I store a Template object inside of $r->pnotes().
I call ->process() on that Template object, with a particular template,
and throw away the output.
The script ends.
I reload the script, it uses an additional 512K of RAM.
Every time I reload the script, the process uses an *additional* 512K
of RAM, forever, on and on, until my server runs out of memory.
HOWEVER: If I "delete $r->pnotes->{template}" before the script ends,
there's no memory leak.
So clearly, mod_perl's RequestRec cleanup is doing something different
than delete is doing, and mod_perl is missing cleaning up certain
references.
We have a bug on this in our system, you can see it at:
https://bugzilla.mozilla.org/show_bug.cgi?id=343166
Any ideas on how I could fix this in Bugzilla?
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla Services. And Everything Else, too.