{"action":"created","issue":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/1401","repository_url":"https://api.github.com/repos/KeepSafe/aiohttp","labels_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/1401/labels{/name}","comments_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/1401/comments","events_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/1401/events","html_url":"https://github.com/KeepSafe/aiohttp/issues/1401","id":189215955,"number":1401,"title":"Serving static files with add_static() breaks event loop on windows","user":{"login":"major12","id":51162,"avatar_url":"https://avatars.githubusercontent.com/u/51162?v=3","gravatar_id":"","url":"https://api.github.com/users/major12","html_url":"https://github.com/major12","followers_url":"https://api.github.com/users/major12/followers","following_url":"https://api.github.com/users/major12/following{/other_user}","gists_url":"https://api.github.com/users/major12/gists{/gist_id}","starred_url":"https://api.github.com/users/major12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/major12/subscriptions","organizations_url":"https://api.github.com/users/major12/orgs","repos_url":"https://api.github.com/users/major12/repos","events_url":"https://api.github.com/users/major12/events{/privacy}","received_events_url":"https://api.github.com/users/major12/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-14T20:23:36Z","updated_at":"2016-11-16T17:16:31Z","closed_at":"2016-11-16T17:16:31Z","body":"## Long story short\r\n\r\nServing big static file makes impossible to process new requests at this time. Event loop does not pass execution to other coroutines.\r\nIf client stops to receive file in the middle of transfer then server becomes broken - it cannot receive/process new requests.\r\n\r\n## Expected behaviour\r\n\r\nOther requests can be processed while file is served.\r\n\r\n## Actual behaviour\r\n\r\nServer hangs for some time or becomes broken forever.\r\n\r\n## Steps to reproduce\r\nServer:\r\n```\r\nfrom aiohttp import web\r\n\r\ndef index(request):\r\n    return web.Response(text='hello world')\r\n\r\napp = web.Application()\r\napp.router.add_get('/', index)\r\napp.router.add_static('/static/', path=str('./test/'))\r\nweb.run_app(app)\r\n```\r\nClient:\r\n```\r\nimport asyncio\r\nfrom aiohttp import ClientSession\r\n\r\nasync def download(file):\r\n    async with ClientSession() as session:\r\n        async with session.get(file) as resp:\r\n            while True:\r\n                data = await resp.content.read(1000)\r\n                if not data:\r\n                    break\r\n                await asyncio.sleep(1)\r\n\r\nloop = asyncio.get_event_loop()\r\nloop.run_until_complete(download('http://127.0.0.1:8080/static/1.mkv'))\r\nloop.close()\r\n```\r\n \r\n1. Copy your favourite movie to test/1.mkv\r\n2. Run server\r\n3. Try to fetch page http://127.0.0.1:8080/\r\n4. Run client\r\n5. Try to fetch page http://127.0.0.1:8080/ one more time\r\n\r\n\r\n## Your environment\r\naiohttp (1.1.3)\r\nPython 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32\r\nWin10\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/comments/261009506","html_url":"https://github.com/KeepSafe/aiohttp/issues/1401#issuecomment-261009506","issue_url":"https://api.github.com/repos/KeepSafe/aiohttp/issues/1401","id":261009506,"user":{"login":"asvetlov","id":356399,"avatar_url":"https://avatars.githubusercontent.com/u/356399?v=3","gravatar_id":"","url":"https://api.github.com/users/asvetlov","html_url":"https://github.com/asvetlov","followers_url":"https://api.github.com/users/asvetlov/followers","following_url":"https://api.github.com/users/asvetlov/following{/other_user}","gists_url":"https://api.github.com/users/asvetlov/gists{/gist_id}","starred_url":"https://api.github.com/users/asvetlov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asvetlov/subscriptions","organizations_url":"https://api.github.com/users/asvetlov/orgs","repos_url":"https://api.github.com/users/asvetlov/repos","events_url":"https://api.github.com/users/asvetlov/events{/privacy}","received_events_url":"https://api.github.com/users/asvetlov/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T17:16:31Z","updated_at":"2016-11-16T17:16:31Z","body":"Excellent catch!\r\nFixed by aiohttp 1.1.5"}}
{"actor":{"display_login":"asvetlov"}}