[Zope] are there any known memory leaks in Zope 2.2.1?

Skip Montanaro skip@mojam.com (Skip Montanaro)
Tue, 12 Sep 2000 13:14:41 -0500 (CDT)


I'm experiencing bad memory leaks in my ZServer-based system.  I recently
upgraded from 2.0.0 to 2.2.1.  I didn't have leakage using 2.0.0 - certainly
nothing like I'm seeing it now.  When I call the same method (same
parameters as well) over and over, I pretty significant leakage via isolate
methods exposed through ZServer to test scripts that don't use ZServer, no
leakage occurs, so I'm beginning to think there's something amiss with
ZServer or DocumentTemplate (the two pieces I use most heavily) or the parts
they use.  Unfortunately, even disconnected from ZServer, my code is still
pretty dependent on my own environment so I can't easily post a script for
people to gaze at.  One simple method (just executes a DocumentTemplate and
returns the resulting HTML) seems to be growing at a rate of about 16kbytes
every five to ten times it's called.  A search method that calls an XML-RPC
server to do the work is much worse, growing at a rate of 85kbytes to
100kbytes per call.

It's certainly possible that I'm creating some garbage that Python's
reference counting can't reclaim, but when I run my server under Python
2.0b1 with the new garbage collector enabled (and collecting at each call)
it never finds anything to collect, so it would appear that the garbage is
either being created at a lower level (non-Python heap allocations in C
code) or Python objects are getting appended to lists or dicts that are
visible to some part of the system (just not obvious to me).

What tools are available to try and detect memory leaks in Zope-ish
applications?  What input can I provide to DC or other interested experts to
help track this down?

Thx,

-- 
Skip Montanaro (skip@mojam.com)
http://www.mojam.com/
http://www.musi-cal.com/