[Twisted-Python] help with refcounts and memleaks

Andrea Arcangeli andrea at cpushare.com
Tue Dec 27 08:37:54 EST 2005

On Tue, Dec 27, 2005 at 09:35:03AM +0100, Thomas HERVE wrote:
> But you may have to adjust the gc threshold in real life application 
> (note that
> a reconnectingclientfactory with a disconnect every second is not 
> exactly a use
> case).

You just need to send a buffer larger than MAX_LENGTH of the
Int32StringReceiver to trigger a disconnect on the other end, this is
what my testcase did. Of course it's not the normal behaviour, but
python shouldn't allocate >1G of ram in that case, exactly because this
is not a common load, you should only have to worry about why the other
end dropped the connection, and not about the memory management.

More information about the Twisted-Python mailing list