{"action":"opened","issue":{"url":"https://api.github.com/repos/gevent/gevent/issues/649","labels_url":"https://api.github.com/repos/gevent/gevent/issues/649/labels{/name}","comments_url":"https://api.github.com/repos/gevent/gevent/issues/649/comments","events_url":"https://api.github.com/repos/gevent/gevent/issues/649/events","html_url":"https://github.com/gevent/gevent/issues/649","id":105058403,"number":649,"title":"pywsgi cause file-descriptor's leak","user":{"login":"byaka","id":1580811,"avatar_url":"https://avatars.githubusercontent.com/u/1580811?v=3","gravatar_id":"","url":"https://api.github.com/users/byaka","html_url":"https://github.com/byaka","followers_url":"https://api.github.com/users/byaka/followers","following_url":"https://api.github.com/users/byaka/following{/other_user}","gists_url":"https://api.github.com/users/byaka/gists{/gist_id}","starred_url":"https://api.github.com/users/byaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byaka/subscriptions","organizations_url":"https://api.github.com/users/byaka/orgs","repos_url":"https://api.github.com/users/byaka/repos","events_url":"https://api.github.com/users/byaka/events{/privacy}","received_events_url":"https://api.github.com/users/byaka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-06T00:23:34Z","updated_at":"2015-09-06T00:23:34Z","closed_at":null,"body":"First of all, i have javascript code, installed on some sites. Summary traffic from all this sites near 1.5kk per day (near 20 requests per second). This script request server via ajax with POST request.\r\n\r\nnow i run this simple server\r\n```python\r\n# -*- coding: utf-8 -*-\r\nimport gevent\r\nfrom gevent.pywsgi import WSGIServer\r\nimport gevent.monkey\r\n\r\ndef application(env, start_response):\r\n   start_response('200 OK', [('Content-Type', 'application/json'), ('Access-Control-Allow-Headers', 'Origin, Authorization, X-Requested-With, Content-Type, Accept'), ('Access-Control-Max-Age','0'), ('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'), ('Access-Control-Allow-Origin', '*'), ('Access-Control-Allow-Methods', 'GET, POST, OPTIONS')])\r\n   return [\"test\\n\"]\r\n\r\nif __name__ == '__main__':\r\n   print gevent.__version__\r\n   print 'Running..'\r\n   gevent.monkey.patch_all()\r\n   WSGIServer(('0.0.0.0', 6001), application, log=None).serve_forever()\r\n\r\n```\r\nand add test ajax request in my javascript code to this server.\r\n\r\nnow i'm look to count of File-descriptors, used by process.\r\n```bash\r\nwatch -d 'cd /proc/$PID$/fd && ls -l | wc -l'\r\n```\r\n\r\nand now i wait 1 hour. After it i see more then 200 file-descriptors, opened by server's process.\r\nAnd this number incrementing forever, while not be a OS limit. And then process report error, of course.\r\n\r\nDebian, Python 2.7, Gevent 1.0.2.\r\n\r\nAny ideas?"}}