finding memory leak in edgewall trac 0.11

Christian Heimes lists at cheimes.de
Sat Jan 19 10:14:26 EST 2008


rupert.thurner wrote:
> what would be a good means of finding where the 0.11 version of
> edgewall trac uses excessive memory. see
> http://groups.google.com/group/trac-dev/browse_thread/thread/116e519da54f16b
> for some details, where jonas suggested
> http://wingolog.org/archives/2007/11/27/reducing-the-footprint-of-python-applications
> as reading.
> 
> tiran already gave some hints on http://bugs.python.org/issue1871, but
> also suggested to ask the general mailing list:
> 
> Do you have classes with a __del__ method which may create reference
> cycles? The GC can't break cycles when a __del__ method is involved.
> 
> Are you keeping references to tracebacks, exception objects (except
> Exception, err) or frames (sys._getframe())

I forgot one important point in my reply. The GC module contains some
useful methods for debugging. Check gc.garbage. It should be empty.

http://docs.python.org/lib/module-gc.html

Christian




More information about the Python-list mailing list