Leaking HTTP requests (was: RE: [Zope] LeakingAcquisition.Imp licitAcquirerWrapper)

Dieter Maurer dieter at handshake.de
Sun May 16 17:58:43 EDT 2004


Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote at 2004-5-14 14:10 -0400:
> ...
>The one great thing I'd like to be able to do is "attach" myself to
>the instances left around so I can inspect them ... Is that at all
>doable?  I have the monitor port open, maybe I can go in that way ...

I fear it is at least very difficult...

Normal Python builds just maintain the numbers of objects.
You do not get a handle to them.

You can build Python in a way that all objects are linked
together. With such a build, you can locate and analyse
the objects.

However, I doubt that this will be the most efficient way
to solve the problem. I am still convinced that the following approach
gives the fasted success:

  *  let your system run for a while

  *  minimize the ZODB caches

  *  look at the reference counts in "Control_Panel --> Debug management"

  *  identify the class with should be rarely instantiated but nevertheless
     shows a high reference count.

  *  test the assumption that this class is responsible
     by mass operations on the class (e.g. with the "ab"
     utilitiy (part of Apache)).

>There's also gdb, but I've never used it at all :(

It will not help you.

>Oh and there's pdb

It will only help you, once you know the primary class responsible
for the cycle (to pin the cycle building down to a specific
location).

-- 
Dieter



More information about the Zope mailing list