How do I begin debugging a python memory leak?
Chris Withers
chris at simplistix.co.uk
Fri Sep 18 05:27:14 EDT 2009
Matthew Wilson wrote:
> I have a web app based on TurboGears 1.0. In the last few days, as
> traffic and usage has picked up, I noticed that the app went from using
> 4% of my total memory all the way up to 50%.
>
> I suspect I'm loading data from the database and somehow preventing
> garbage collection.
>
> Are there any tools that might help me out with this?
http://pypi.python.org/pypi/guppy
...which will give you:
http://guppy-pe.sourceforge.net/heapy_tutorial.html
Good for finding out what's making up the memory usage.
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the Python-list
mailing list