{"action":"created","issue":{"url":"https://api.github.com/repos/mitsuhiko/flask/issues/1473","labels_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1473/labels{/name}","comments_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1473/comments","events_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1473/events","html_url":"https://github.com/mitsuhiko/flask/issues/1473","id":82376370,"number":1473,"title":"Flask server stops responding to new HTTP connections","user":{"login":"mk270","id":923403,"avatar_url":"https://avatars.githubusercontent.com/u/923403?v=3","gravatar_id":"","url":"https://api.github.com/users/mk270","html_url":"https://github.com/mk270","followers_url":"https://api.github.com/users/mk270/followers","following_url":"https://api.github.com/users/mk270/following{/other_user}","gists_url":"https://api.github.com/users/mk270/gists{/gist_id}","starred_url":"https://api.github.com/users/mk270/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mk270/subscriptions","organizations_url":"https://api.github.com/users/mk270/orgs","repos_url":"https://api.github.com/users/mk270/repos","events_url":"https://api.github.com/users/mk270/events{/privacy}","received_events_url":"https://api.github.com/users/mk270/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-29T10:43:52Z","updated_at":"2015-05-29T11:00:56Z","closed_at":null,"body":"After a day or two, my Flask app stops noticing new connections; strace says:\r\n\r\nmk@pling /proc/31539/fd> strace -p 31539 -e '!stat'\r\nProcess 31539 attached - interrupt to quit\r\nselect(0, NULL, NULL, NULL, {0, 805175}) = 0 (Timeout)\r\nselect(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)\r\nselect(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)\r\nselect(0, NULL, NULL, NULL, {1, 0}^C <unfinished ...>\r\nProcess 31539 detached\r\n\r\n(note that the stat() calls between each select() have been omitted).\r\n\r\nSo select() is being called without any fds, basically as a blocking primitive, but I seem to have the following fds:\r\n\r\nlsof -p etc:\r\npython  31539   mk    3u  IPv4 141934535      0t0      TCP *:5000 (LISTEN)\r\npython  31539   mk    4u  IPv4 142787301      0t0      TCP 93.93.128.61:5000->61.240.144.65:60000 (ESTABLISHED)\r\n\r\nSo it should by rights be select()ing on fd 3 at the very least.\r\n"},"comment":{"url":"https://api.github.com/repos/mitsuhiko/flask/issues/comments/106775278","html_url":"https://github.com/mitsuhiko/flask/issues/1473#issuecomment-106775278","issue_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1473","id":106775278,"user":{"login":"mk270","id":923403,"avatar_url":"https://avatars.githubusercontent.com/u/923403?v=3","gravatar_id":"","url":"https://api.github.com/users/mk270","html_url":"https://github.com/mk270","followers_url":"https://api.github.com/users/mk270/followers","following_url":"https://api.github.com/users/mk270/following{/other_user}","gists_url":"https://api.github.com/users/mk270/gists{/gist_id}","starred_url":"https://api.github.com/users/mk270/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mk270/subscriptions","organizations_url":"https://api.github.com/users/mk270/orgs","repos_url":"https://api.github.com/users/mk270/repos","events_url":"https://api.github.com/users/mk270/events{/privacy}","received_events_url":"https://api.github.com/users/mk270/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T11:00:56Z","updated_at":"2015-05-29T11:00:56Z","body":"And I have to use some external nonsense like gunicorn to work around this?"}}