[ZODB-Dev] Investigating a Zope reference leak... tracking object creation

Ben Last (ZODBDev) zodbdev at benlast.com
Sat Jan 29 03:25:00 EST 2005


Thanks, Dieter.

Dieter Maurer wrote:
> The first thing you should do when you expect leaks: flush
> the ZODB cache. Look again at your reference counts.

The caches are being flushed on every page load (on the test system;
the production system is very aggressively proxy-cached so I'll probably
keep that the case there).  The Python gc.collect() is also called for
good measure. The reference counts remain high.

> Especially, if your image count would go down, then it would probably
> mean that some of your persistent objects have images as
> volatile attributes (e.g. in various scales (thumbnail, lowres, ...)).
Problem is that I don't have any persistent objects.  Zope for us is a Python
web server engine (predominantly as ExternalMethods or PythonScripts) with ZPT
used as the presentation layer.  The images are loaded by the ExternalMethod
code, but only so that width, height and title can be gathered; after that the
reference variable is explicitly deleted (this added whilst trying to track down
the leak).

Many thanks for your help
Regards
Ben


More information about the ZODB-Dev mailing list