[Twisted-Python] Twisted client memory leak

Phil Mayers p.mayers at imperial.ac.uk
Tue Jan 22 12:37:54 EST 2013

On 22/01/13 17:06, Facundo Batista wrote:
> On Tue, Jan 22, 2013 at 2:02 PM, Phil Mayers <p.mayers at imperial.ac.uk> wrote:
>> On 22/01/13 16:45, Facundo Batista wrote:
>>> Yes, but note that without the __del__ it had the same behaviour...
>> Not quite. The OP said that:
>>    a) He had a problem with a Twisted app not freeing memory under load
>>    b) He had reproduced that problem with his example, that included __del__
>> Nowhere did he say "it does the same without __del__". He was in fact
>> not specific about whether the original/real code uses __del__ or not.
> He didn't say it. I'm saying it, after testing it.

When you say "it", you mean his example code as posted to the list, right?

Because having just tested it, I don't see any problem - his example 
code has stable memory usage for both client/server processes, and with 
the client making 1, 100 or 1000 connections/sec, and the debug shows 
protocol and factory instances being freed as I would expect i.e. in a 
timely fashion, not just at process close.

Tested on both:

Python 2.7.3 / Twisted 11.1.0 / Linux 64-bit
Python 2.6.8 / Twisted 12.2.0 / Linux 64-bit


More information about the Twisted-Python mailing list