TwistedElephant: A Memory Debugger for Twisted Applications

Recently, I was trying to figure out why a Twisted application was leaking memory at a disturbingly rapid rate. In the process of investigation, I hacked up some one-off bits of logging within the target application that used Python’s GC module and my di() hack such that I could explore the active object graph within the Twisted process.

Knowing that I would be faced with this problem again, I did a bit of recreational hacking over Memorial Day and created a primitive, though effective, general purpose Twisted memory debugging tool.

It is called TwistedElephant.

It lives in my personal SVN repository at red-bean:

It includes some quick documentation.

Note that it is a complete hack that was just good enough to solve a set of memory debugging problems that I had at the time. There are dozens of improvements that can be made and likely some great bugs, too.

Patches welcome!

Deprecated: link_pages is deprecated since version 2.1.0! Use wp_link_pages() instead. in /srv/www/friday/bbum/wp-includes/functions.php on line 4713

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>