[pypy-dev] Memory leaks in Pypy

Maciej Fijalkowski fijall at gmail.com
Thu Jan 23 17:27:16 CET 2014


On Thu, Jan 23, 2014 at 2:44 PM, Marko Tasic <mtasic85 at gmail.com> wrote:

> Hi Ron,
>
> Exactly same problem I have discovered yesterday in one of my production
> servers running PyPy 2.2.1, Flask==0.10.1, gunicorn==18.0 and tornado==3.2
> on ArchLinux updated on daily basis. I do not have more details on this,
> but I can say only that POST requests takes at least 10x slower then on
> CPython. However, I measured time spent inside method and its 0.01s, and
> actual sending of response takes 30s. This is very strange for reason.
>
> How I can help on this and send you more details?
>
> Regards,
> Marko Tasic
>

gunicorn is a bit dodge (it's pypy support is not very official), but I can
give it a go - please write some sort of reproducible example and we can
take it from there.


>
>
> On Wed, Jan 22, 2014 at 2:08 PM, Ron Reiter <ron.reiter at gmail.com> wrote:
>
>> Something really strange is happening to me. I've stumbled upon a memory
>> leak that happens only when answering a POST request using Twisted and Pypy.
>>
>> The problem is described here:
>>
>>
>> http://stackoverflow.com/questions/21063842/using-twisted-cyclone-pypy-to-handle-post-requests-cause-a-memory-leak
>>
>> It could either be a bug in the Python code that handles the request and
>> leaks, a but in Twisted, or in Pypy.
>>
>> I've been investing the problem for weeks now, with the following
>> conclusion:
>>
>> * CPython does not leak with this code
>> * Tornado with Pypy does not leak with this code
>> * Answering GET requests instead of POST requests does not leak with this
>> code
>> * I tried switching GCs, collecting using gc.collect and setting
>> PYPY_GC_MAX, those attempts did not help
>> * This happens both on Linux and Mac
>>
>> Insights as to how to debug this are very welcome.
>>
>> Thanks,
>>
>> --
>>
>> Ron Reiter
>> [image: Facebook] <http://www.facebook.com/ron.reiter> [image: Twitter]<http://twitter.com/#!/ronreiter> [image:
>> LinkedIn]<http://www.linkedin.com/profile/view?id=4436607&locale=en_US&trk=tab_pro>
>> Contact me: [image: Skype] ron.reiter
>>
>> _______________________________________________
>> pypy-dev mailing list
>> pypy-dev at python.org
>> https://mail.python.org/mailman/listinfo/pypy-dev
>>
>>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20140123/980a3a2c/attachment-0001.html>


More information about the pypy-dev mailing list