[Twisted-Python] Twisted Memory Leaks & Epoll
Matthew Glubb
matt at zgroupplc.com
Tue May 1 10:09:25 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi All,
Thanks for all of your tips. I am sure that I'll get to the bottom of
it. I think I'll start with pysizer and Andrew's ref counter...
Matt
On 1 May 2007, at 14:38, Andrew Bennetts wrote:
> Matthew Glubb wrote:
> [...]
>> For the purposes of diagnosing the cause of the leak (C extension,
>> python, twisted, or my code) I have removed external library
>> dependencies and I have also swapped out reactors. The leak persists.
>
> Those are all good steps to take to isolate the problem.
>
>> Does anyone have any good tips for diagnosing leaks under twisted?
>
> Basically, the same as for any other long-lived Python program:
>
> * try to find a minimal case that reproduces the problem, e.g. a
> simple
> request that leaks some bytes when repeated, or even better a
> simple
> function call, and hope the cause becomes obvious as you narrow
> it down
> * try memory profilers like http://pysizer.8325.org/
> * try my crude hack: http://twistedmatrix.com/users/spiv/
> countrefs.py
> * try to reproduce without any C extensions, to determine if the
> leak is in a
> C extension or pure python code
>
> -Andrew.
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
m a t t h e w g l u b b
________________________________________________________________________
Z Group PLC
Tel: +44 (0) 8700 111 173
Fax: +44 (0) 8707 051 393
Txt: +44 (0) 7800 140 877
Web: <http://www.zgroupplc.com/>
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. The opinions expressed in this mail are those of the author
and do not necessarily represent the views of the company. If you have
received this email in error please notify <service at zgroupplc.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFGN0oVyI6MkdKPngkRAnOvAJ4/hJoYluJCvI5mwZpmg884L6d3vACdGhgQ
I1blYJEaH+nn+BiIcSIK9Ik=
=FwY8
-----END PGP SIGNATURE-----
More information about the Twisted-Python
mailing list