{"action":"reopened","issue":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO/issues/328","repository_url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO","labels_url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO/issues/328/comments","events_url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO/issues/328/events","html_url":"https://github.com/miguelgrinberg/Flask-SocketIO/issues/328","id":178092367,"number":328,"title":"Gunicorn Server suddenly stops accepting new connections","user":{"login":"christopher-abastar","id":12439198,"avatar_url":"https://avatars.githubusercontent.com/u/12439198?v=3","gravatar_id":"","url":"https://api.github.com/users/christopher-abastar","html_url":"https://github.com/christopher-abastar","followers_url":"https://api.github.com/users/christopher-abastar/followers","following_url":"https://api.github.com/users/christopher-abastar/following{/other_user}","gists_url":"https://api.github.com/users/christopher-abastar/gists{/gist_id}","starred_url":"https://api.github.com/users/christopher-abastar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopher-abastar/subscriptions","organizations_url":"https://api.github.com/users/christopher-abastar/orgs","repos_url":"https://api.github.com/users/christopher-abastar/repos","events_url":"https://api.github.com/users/christopher-abastar/events{/privacy}","received_events_url":"https://api.github.com/users/christopher-abastar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/miguelgrinberg/Flask-SocketIO/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-20T15:23:50Z","updated_at":"2016-10-04T03:44:12Z","closed_at":null,"body":"Hello Miguel,\r\n\r\nCurrently, i'm using the gunicorn server(1 worker) as in the docs specified. Recently, I have around 300+ active clients and recently reached 400+ marked. But suddenly I encountered an error in freebsd 10.3 saying:\r\n\r\n```sh\r\nsonewconn: pcb 0xfffff800c222b620: Listen queue overflow: 3073 already in queue awaiting acceptance (7033 occurrences)\r\n```\r\n\r\nSo I went in and checked the backlog of the queues via netstat -Lan\r\n```\r\nCurrent listen queue sizes (qlen/incqlen/maxqlen)\r\nProto Listen Local Address\r\ntcp4 3073/0/2048 127.0.0.1.5001\r\ntcp4 0/0/4096 *.8888\r\ntcp4 0/0/4096 *.80\r\n```\r\n\r\nAlso the time wait state of the connections was very high.\r\n```sh\r\nnetstat -a | grep TIME_WAIT | wc -l \r\n2919\r\n```\r\nI already posted some questions on reddit/r/freebsd to confirmed that it isn't some driver bug\r\n\r\nhttps://www.reddit.com/r/freebsd/comments/53nmae/help_on_listen_queue_overflow/\r\n\r\nThe CPU wasn't high that high 5-10% as I'm running a c4.large and utilizing only 1 CPU & 1 process (for debugging process).\r\n\r\nThe only problem is when this occurred, it stopped accepting new connections (no gunicorn error or whatever) it just stopped. I just saw the number of clients dropping and activity is still going on.\r\n\r\nI reverted back to standalone eventlet run.py for now. (hoping it won't occur as I just recently migrated to gunicorn setup)\r\n\r\nHere's the command i use for the gunicorn\r\n\r\n```sh\r\ncommand= /home/xx/env/bin/gunicorn wsgi:app --bind 127.0.0.1:5001 --pid /tmp/gunicorn-chat1.pid --workers 1 --worker-class eventlet --error-logfile /var/log/gunicorn/gunicorn-chat.err\r\n```\r\n\r\nHoping for your insights.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"christopher-abastar"}}