[Zope] My Zope is leaking memory ... Still no luck.
Jo Meder
jo@meder.de
Fri, 29 Nov 2002 08:48:14 +0100
Am 28.11.2002, 20:41 Uhr
schräb Jean-Francois.Doyon@CCRS.NRCan.gc.ca <Jean-Francois.Doyon@CCRS.NRCan.gc.ca>:
> Well, I'm still not having any luck tracking this down ... I've tried to
> keep a nice and close eye on the top refcounts, but I'm not seeing anything
> strange, the really big delta is on the DateTime object, as the refcount
> seems to vary quite a bit, but the top one is fairly stable.
Do you use PythonScripts (ZODB-based that is, not Products)?
We had the same effect as the one you describe and solved it at least
partially by setting every object used inside our PythonScripts to None
before returning from the script. So if you have code along the lines of
"something=context.restrictedTraverse('whatever')" or
"baz=foo.objectValues(bar)" (or anything like that) try setting
"something=baz=None" before the script ends.
BTW: LeakFinder is a great tool, very useful in my experience and I
deeply regret that it is no longer working with 2.6. Be prepared to
restart your Zope after using it though.
Jo.
--
Internetmanufaktur Jo Meder ---------------------- Berlin, Germany
http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33
Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45
10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97
Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt