Message145166
Explanation from dablitz's comment at https://bugs.pypy.org/issue867 :
<quote>
urllib2 in the stdlib leaks fd's if an exception is raised while opening a connection. The issue occurs due to a socket being opened then an exception being raised before an object with the socket is returned, leaving no way to explicitly close the object. On cpython this would not be an issue as the object would lose all references almost immediately however it lingers around with a proper GC causing FD's to build up if the same condition happens repeatedly (eg a loop/web crawling)
The file enclosed is a script to generate the leakage, to run invok it as follows <python> leak.py
pypy should start leaking FD's and can be see in /proc/<pid of leak.py>/fd
</quote>
Related issues:
http://bugs.python.org/issue3066
http://bugs.python.org/issue1208304
http://bugs.python.org/issue1601399 |
|
Date |
User |
Action |
Args |
2011-10-08 12:25:53 | Valery.Khamenya | set | recipients:
+ Valery.Khamenya |
2011-10-08 12:25:53 | Valery.Khamenya | set | messageid: <1318076753.32.0.0530567720617.issue13131@psf.upfronthosting.co.za> |
2011-10-08 12:25:52 | Valery.Khamenya | link | issue13131 messages |
2011-10-08 12:25:52 | Valery.Khamenya | create | |
|