{"action":"created","issue":{"url":"https://api.github.com/repos/channelcat/sanic/issues/1079","repository_url":"https://api.github.com/repos/channelcat/sanic","labels_url":"https://api.github.com/repos/channelcat/sanic/issues/1079/labels{/name}","comments_url":"https://api.github.com/repos/channelcat/sanic/issues/1079/comments","events_url":"https://api.github.com/repos/channelcat/sanic/issues/1079/events","html_url":"https://github.com/channelcat/sanic/issues/1079","id":285696537,"node_id":"MDU6SXNzdWUyODU2OTY1Mzc=","number":1079,"title":"Workers die periodically (because of the request timeout?)","user":{"login":"hatarist","id":2741725,"node_id":"MDQ6VXNlcjI3NDE3MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/2741725?v=4","gravatar_id":"","url":"https://api.github.com/users/hatarist","html_url":"https://github.com/hatarist","followers_url":"https://api.github.com/users/hatarist/followers","following_url":"https://api.github.com/users/hatarist/following{/other_user}","gists_url":"https://api.github.com/users/hatarist/gists{/gist_id}","starred_url":"https://api.github.com/users/hatarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatarist/subscriptions","organizations_url":"https://api.github.com/users/hatarist/orgs","repos_url":"https://api.github.com/users/hatarist/repos","events_url":"https://api.github.com/users/hatarist/events{/privacy}","received_events_url":"https://api.github.com/users/hatarist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-01-03T14:06:37Z","updated_at":"2018-07-02T10:30:33Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This was happening with sanic 0.6.0 + uvloop 0.8.1 and keeps happening with sanic 0.7.0 + uvloop 0.9.1.\r\n\r\nI'm not sure I know how to reproduce this. \r\n\r\n    2018-01-03 13:26:19.86 - 30577 - (project.app): exception_handler [INFO]: EXCEPTION_HANDLER: URL='http://***/***', EXCEPTION=ServiceUnavailable('Response Timeout',)\r\n    2018-01-03 13:26:19.92 - 30577 - (project.app): exception_handler [INFO]: Caught an exception\r\n    Traceback (most recent call last):\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 178, in response_timeout_callback\r\n        raise ServiceUnavailable('Response Timeout')\r\n    sanic.exceptions.ServiceUnavailable: Response Timeout\r\n    2018-01-03 13:26:19.93 - 30577 - (asyncio): serve [ERROR]: Exception in callback <bound method HttpProtocol.response_timeout_callback of <sanic.server.HttpProtocol object at 0x7fdf84667710>>\r\n    handle: <TimerHandle HttpProtocol.response_timeout_callback>\r\n    Traceback (most recent call last):\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 178, in response_timeout_callback\r\n        raise ServiceUnavailable('Response Timeout')\r\n    sanic.exceptions.ServiceUnavailable: Response Timeout\r\n    During handling of the above exception, another exception occurred:\r\n    Traceback (most recent call last):\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 416, in write_error\r\n        self.transport.write(response.output(version))\r\n    AttributeError: 'NoneType' object has no attribute 'write'\r\n    During handling of the above exception, another exception occurred:\r\n    Traceback (most recent call last):\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 424, in write_error\r\n        repr(e)), from_error=True\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 436, in bail_out\r\n        self.transport.get_extra_info('peername'))\r\n    AttributeError: 'NoneType' object has no attribute 'get_extra_info'\r\n    During handling of the above exception, another exception occurred:\r\n    Traceback (most recent call last):\r\n      File \"uvloop/cbhandles.pyx\", line 201, in uvloop.loop.TimerHandle._run\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 180, in response_timeout_callback\r\n        self.write_error(exception)\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 430, in write_error\r\n        self.transport.close()\r\n    AttributeError: 'NoneType' object has no attribute 'close'\r\n    2018-01-03 13:26:19.104 - 30577 - (project.app): exception_handler [INFO]: EXCEPTION_HANDLER: URL=None, EXCEPTION=RequestTimeout('Request Timeout',)\r\n    2018-01-03 13:26:19.107 - 30577 - (project.app): exception_handler [INFO]: Caught an exception\r\n    Traceback (most recent call last):\r\n      File \"/home/project/project/env/lib/python3.6/site-packages/sanic/server.py\", line 162, in request_timeout_callback\r\n        raise RequestTimeout('Request Timeout')\r\n    sanic.exceptions.RequestTimeout: Request Timeout\r\n    python: src/unix/core.c:896: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.\r\n\r\nI started the server with the --workers=12, and `ps aux | grep project | wc -l` showed 13 processes (like, the master one and 12 workers); but after such an error it shows one less (12 processes, so one of the workers seems to be dropped dead).\r\n\r\nI'll try to fix it myself, just wanted you guys to know about such an issue."},"comment":{"url":"https://api.github.com/repos/channelcat/sanic/issues/comments/401756441","html_url":"https://github.com/channelcat/sanic/issues/1079#issuecomment-401756441","issue_url":"https://api.github.com/repos/channelcat/sanic/issues/1079","id":401756441,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTc1NjQ0MQ==","user":{"login":"ywangzi","id":23702741,"node_id":"MDQ6VXNlcjIzNzAyNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/23702741?v=4","gravatar_id":"","url":"https://api.github.com/users/ywangzi","html_url":"https://github.com/ywangzi","followers_url":"https://api.github.com/users/ywangzi/followers","following_url":"https://api.github.com/users/ywangzi/following{/other_user}","gists_url":"https://api.github.com/users/ywangzi/gists{/gist_id}","starred_url":"https://api.github.com/users/ywangzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywangzi/subscriptions","organizations_url":"https://api.github.com/users/ywangzi/orgs","repos_url":"https://api.github.com/users/ywangzi/repos","events_url":"https://api.github.com/users/ywangzi/events{/privacy}","received_events_url":"https://api.github.com/users/ywangzi/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T10:30:33Z","updated_at":"2018-07-02T10:30:33Z","author_association":"NONE","body":"try:  app.config.RESPONSE_TIMEOUT = 600"}}
{"actor":{"display_login":"ywangzi"}}