tracing memory leaks in Python (multiprocessing)

memory-leaks, multiprocessing, python

Solution

I have hunted down the memory leak (which was in external C library) by using muppy - great tool, I wish I found it sooner! Thanks all for the answers.

Problem

I have a `multiprocessing` application that leaks memory. However, the leak is not in the main process (according to Dowser and `top`) but in the subprocesses. Is there any way I can use Dowser (or similar tool) on subprocesses to trace the leak? If not, how do it trace it? UPDATE:I spent lots of time trying to use heapy and gnibbler's code but I couldn't locate the leak. I then stopped cherrypy in the main process and started another one (with Dowser) in the subprocess. But after a few minutes CherryPy would stop listening to the port... :( So I'm still looking for a better idea.

Original source

Related problems