RE: [Zope] My Zope is leaking memory ... Still no luck.
Jo, Really? Wow, you'd think such a required behavior would be documented ... Unless I missed it somewhere. I do indeed use quite a bit of Python Scripts ... Problem is many of them are part of the CMF ... I really don't want to have to go through every bit of python script I have to do this, and would much prefer finding the root cause! Maybe I'll go digging for documented bugs and possible patches concerning Ptyhon Scripts ... Thanks, J.F. -----Original Message----- From: Jo Meder [mailto:jo@meder.de] Sent: Friday, November 29, 2002 2:48 AM To: Jean-Francois.Doyon@ccrs.nrcan.gc.ca Cc: zope@zope.org Subject: Re: [Zope] My Zope is leaking memory ... Still no luck. 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
Am 29.11.2002, 21:06 Uhr schrob Jean-Francois.Doyon@CCRS.NRCan.gc.ca <Jean-Francois.Doyon@CCRS.NRCan.gc.ca>: [Forcing transient objects to be deleted at end of PythonScripts to avoid memory leaks]
Really? Wow, you'd think such a required behavior would be documented ... Unless I missed it somewhere.
AFAIK it isn't documented and IMHO it's a bug anyway, so I suppose it should not be documented but solved. Sigh. So much to do and so little time.
I do indeed use quite a bit of Python Scripts ... Problem is many of them are part of the CMF ...
Perhaps we have a pattern here. Just like you we use CMF, but we started with an older version (that was mostly DTML and only some PythonScripts) and have since then rewritten or at least changed almost everything in the skins folders. One problem wrt to the memory leaks we have not solved yet: When we refresh one of our products that is part of our CMS Zope starts to leak memory like there's no tomorrow. Restarting Zope immediately stops this.
I really don't want to have to go through every bit of python script I have to do this, and would much prefer finding the root cause!
If you have any success, even clues or insights: I'd very much appreciate it if you kept me (or the list, of course) posted. 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
participants (2)
-
Jean-Francois.Doyon@CCRS.NRCan.gc.ca -
Jo Meder