[Zope-dev] Memory Leak Problem
Oliver Bleutgen
myzope@gmx.net
Tue, 12 Mar 2002 18:38:16 +0100
>>Hi all,
>>
>>i have a little problem with my production server.
>>The memory usage of the zope processes running on this server are
>>growing up
>>100K a day upto 1MB a day.
>>How can i track down the problem.
[snip]
Chris McDonough wrote:
> Finding memory leaks is an exercise in "binary search". Isolate half of the
> Zope (and Product) code and find out if it leaks. If it doesn't, you know
> the problem is in the other half. ;-) Ad infinitum. I'm sorry this is the
> case, but it almost always boils down to this particular recipe of
> diagnostics.
A question and one remark.
Wouldn't staring at the refcounts in the debug panel also give some
info? At least for selfmade products?
Something like:
Acquisition.ImplicitAcquirerWrapper: 42442
OFS.DTMLMethod.DTMLMethod: 3989
ZPublisher.HTTPRequest.HTTPRequest: 3941
ZServer.HTTPResponse.ZServerHTTPResponse: 3934
ZPublisher.BaseRequest.RequestContainer: 3931
AccessControl.DTML.TemplateDict: 3930
doesn't surely look too good, heh? ;-)
Yes this is from a production server, which now get's restarted as it
occupies 130MB (up from 15MB in 10 days).
The remark, Andre, Chris has written a very nice product, called
AutoLance which helps by monitoring zope's memory usage and restarting
if a configurable threshold is reached.
http://www.zope.org/Members/mcdonc/Products/AutoLance
We use it on a production server.
cheers,
oliver