{"action":"opened","issue":{"url":"https://api.github.com/repos/django/daphne/issues/175","repository_url":"https://api.github.com/repos/django/daphne","labels_url":"https://api.github.com/repos/django/daphne/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/django/daphne/issues/175/comments","events_url":"https://api.github.com/repos/django/daphne/issues/175/events","html_url":"https://github.com/django/daphne/issues/175","id":298198279,"number":175,"title":"Request.finish called on a request after its connection was lost","user":{"login":"intellineers","id":17159259,"avatar_url":"https://avatars1.githubusercontent.com/u/17159259?v=4","gravatar_id":"","url":"https://api.github.com/users/intellineers","html_url":"https://github.com/intellineers","followers_url":"https://api.github.com/users/intellineers/followers","following_url":"https://api.github.com/users/intellineers/following{/other_user}","gists_url":"https://api.github.com/users/intellineers/gists{/gist_id}","starred_url":"https://api.github.com/users/intellineers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/intellineers/subscriptions","organizations_url":"https://api.github.com/users/intellineers/orgs","repos_url":"https://api.github.com/users/intellineers/repos","events_url":"https://api.github.com/users/intellineers/events{/privacy}","received_events_url":"https://api.github.com/users/intellineers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-19T08:50:21Z","updated_at":"2018-02-19T08:50:21Z","closed_at":null,"author_association":"NONE","body":"After dockerizing my application everything works as it should, but sometimes I get the above mentioned error message. The error message is actually coming from Twisted, however it tells me that I should use Request.notify:\r\n\r\n`interface_1  | 2018-02-19 09:21:17,628 ERROR    Exception inside application: Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this.\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/channels/http.py\", line 191, in __call__\r\ninterface_1  |     await self.handle(body)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 108, in __call__\r\ninterface_1  |     return await asyncio.wait_for(future, timeout=None)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/asyncio/tasks.py\", line 339, in wait_for\r\ninterface_1  |     return (yield from fut)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/thread.py\", line 56, in run\r\ninterface_1  |     result = self.fn(*self.args, **self.kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 123, in thread_handler\r\ninterface_1  |     return self.func(*args, **kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/channels/http.py\", line 227, in handle\r\ninterface_1  |     self.send(response_message)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 62, in __call__\r\ninterface_1  |     return call_result.result()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/_base.py\", line 432, in result\r\ninterface_1  |     return self.__get_result()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/_base.py\", line 384, in __get_result\r\ninterface_1  |     raise self._exception\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 76, in main_wrap\r\ninterface_1  |     result = await self.awaitable(*args, **kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/server.py\", line 196, in handle_reply\r\ninterface_1  |     protocol.handle_reply(message)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/http_protocol.py\", line 213, in handle_reply\r\ninterface_1  |     self.finish()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/http_protocol.py\", line 183, in finish\r\ninterface_1  |     http.Request.finish(self)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/twisted/web/http.py\", line 992, in finish\r\ninterface_1  |     \"Request.finish called on a request after its connection was lost; \"\r\ninterface_1  |   Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this.\r\ninterface_1  | 2018-02-19 09:21:17,629 ERROR    Exception inside application: Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this.\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/channels/http.py\", line 191, in __call__\r\ninterface_1  |     await self.handle(body)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 108, in __call__\r\ninterface_1  |     return await asyncio.wait_for(future, timeout=None)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/asyncio/tasks.py\", line 339, in wait_for\r\ninterface_1  |     return (yield from fut)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/thread.py\", line 56, in run\r\ninterface_1  |     result = self.fn(*self.args, **self.kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 123, in thread_handler\r\ninterface_1  |     return self.func(*args, **kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/channels/http.py\", line 227, in handle\r\ninterface_1  |     self.send(response_message)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 62, in __call__\r\ninterface_1  |     return call_result.result()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/_base.py\", line 432, in result\r\ninterface_1  |     return self.__get_result()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/concurrent/futures/_base.py\", line 384, in __get_result\r\ninterface_1  |     raise self._exception\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/asgiref/sync.py\", line 76, in main_wrap\r\ninterface_1  |     result = await self.awaitable(*args, **kwargs)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/server.py\", line 196, in handle_reply\r\ninterface_1  |     protocol.handle_reply(message)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/http_protocol.py\", line 213, in handle_reply\r\ninterface_1  |     self.finish()\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/daphne/http_protocol.py\", line 183, in finish\r\ninterface_1  |     http.Request.finish(self)\r\ninterface_1  |   File \"/usr/local/lib/python3.6/site-packages/twisted/web/http.py\", line 992, in finish\r\ninterface_1  |     \"Request.finish called on a request after its connection was lost; \"\r\ninterface_1  |   Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this.`"}}
{"actor":{"display_login":"intellineers"}}