[Zope-dev] Memory Leak Problem

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 13 Mar 2002 11:16:44 +0000


On Wed, 13 Mar 2002 11:37:00 +0100, Oliver Bleutgen <myzope@gmx.net>
wrote:

>- I did paste only the objects which have such a high count (next one=20
>was approx 200).

Hmm. Ill have to ponder what that means.

>- This server (2.3.3) has no special products on it, just 2 Folderish=20
>ZClasses, which are heavily used (they construct the whole site).
>
>So, can we rule out that there's a bug in the zclasses machinery which=20
>is the cause for this?

No, thats not impossible

> I.e. should there be some zclass related object=20
>in the above list otherwise?

Not necessarily. The class with the bug need not leave an instance of
himself tied up in his immortal cyclic trash.

>Is it right that in Zope 2.3.x (and others?) usage of
><dtml-var "REQUEST.set(...)"> can lead to such leakage?

Yes, thats true in all versions.

>Is there a description somewhere what the basic causes of such leakages=20
>are? I.e. only bugs in python c-code/zope c-code?

No, its possible for a bug in through-the-web edited dtml to cause
this.

>Is there some text about what to not do in python product development to=
=20
>avoid introducing leakage? For example, on #zope someone pointed out to=20
>me that storing acquisition wrappers in the ZODB will lead to leakage.

In old versions (roughly before 2.3 or 2.4; I forget exactly when) it
was possible to create a cyles involving a persistent object having a
reference to an acquisition wrapper. Today that raises an exception.



Toby Dickenson
tdickenson@geminidataloggers.com