RE: [Zope] My Zope is leaking memory ... Still no luck.
Hello everyone, 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. I will keep the LeakFinder as a last resort, as it rather dangrous to run apparently :) So, if the database object caching and refcounts are not the cause, what else could it be? So, a few questions: Could I possibly have written Python Code that would leak memory? Keeping in mind I am in no way a Python wizard? Otherwise, I'm going to turn my attention towards Psycopg, since it is heavily used. Anyone have experience running Zope with ZPsycopgDA, and has had memory usage problems? The site makes several queries per second at least, and each thread (6) opens I think 4 persistent database connnections. I'm also wondering if the fact that I asked Psycopg to use Zope's internal DateTime object instead of the mxDateTime one might be the cause, I'll try to play with that ... So if anyone has any more ideas about this, I'm open to anything! Thanks a bunch, J.F. -----Original Message----- From: Ausum Studio [mailto:ausum_studio@hotmail.com] Sent: Monday, November 25, 2002 3:02 PM To: zope@zope.org Subject: Re: [Zope] My Zope is leaking memory ... You may want to try Shane's LeakFinder: http://www.zope.org/Members/hathawsh/LeakFinder Ausum ----- Original Message ----- From: <Jean-Francois.Doyon@CCRS.NRCan.gc.ca> To: <zope@zope.org> Sent: Monday, November 25, 2002 1:56 PM Subject: [Zope] My Zope is leaking memory ... Hello, Yup, that's right, my Zope is leaking memory, and so far, I've had no luck figuring out where it might come from. I run a Zope 2.5.0 on RedHat 7.3. I started by looking into the Python/C type modules, which I fugred are most likely to be causing this. I upgraded Psycopg to the latest version, but it's still occuring. I also use the PIL, but it is seldom used, and could not be the cause of the kind of leakage I'm seeing. Then there's a much more obscure thing, which is a SWIG interface to PROJ.4 (A geographical projection library) ... I had the author look at it, and no leaks were detected in the C library, or using the SWIG interface (Using Valgrind I beleive). My Z SQL Methods do NOT cache results (Maximum time set 0). (...) Any ideas, comments, insights, tips would be MOST appreciated! Thanks in advance, Jean-François Doyon _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
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
participants (2)
-
Jean-Francois.Doyon@CCRS.NRCan.gc.ca -
Jo Meder