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

Dieter Maurer dieter at handshake.de
Sat Jan 29 14:21:20 EST 2005


Ben Last (ZODBDev) wrote at 2005-1-29 08:25 +0000:
>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).

Do we speak about the same caches?

  I meant "Control_Panel" --> "Database managemanet" --> "main/temporary"
  --> "Flush Cache" --> "Minimize"

"aggressively proxy-cached" seems to indicate a different cache
for me.

> ...
>Problem is that I don't have any persistent objects.

Really?

If you do not have persistent objects, then you do not have
a ZODB question...

> ...
>The images are loaded

I assume from the ZODB

>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).

Even when you delete the reference variable, the object remains
in the ZODB cache. The ZODB has its own cache replacement
strategie which may sooner or later flush the image from the cache.

You can often force the object explicitely from the cache by
calling its "_p_deactivate" method (this will work when the object
is not modified in this transaction).


-- 
Dieter


More information about the ZODB-Dev mailing list