On Fri, Dec 9, 2011 at 7:31 PM, Itamar Turner-Trauring <[email protected]> wrote: >> What's the best solution? Apply the patch attached on this ticket, >> moving to a producer/consumer approach, or any other idea? > > The patch will just delay the problem... you're creating a huge number of > strings, faster than the transport can write them out. The solution is > indeed to use the consumer API to pause creation of more data until the > transport clears its buffers.
Right, I will try with the consumer API. But I have one last question: In my previous example, the memory usage grows until a MemoryError exception. But other scenario is when my "event send loop" iterates a high number of times (but not enough to raise a exception) and then stops. I expected that when the loop ends, all the strings would be flushed and as a consequence, the memory usage of the process would return to a normal level. But this does not happen... It's normal? Thanks! -- Augusto Mecking Caringi _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
