{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2484","repository_url":"https://api.github.com/repos/aspnet/KestrelHttpServer","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2484/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2484/comments","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2484/events","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/2484","id":313678020,"number":2484,"title":"CPU heavy requests cause other fast requests to be delayed?","user":{"login":"Plasma","id":229209,"avatar_url":"https://avatars3.githubusercontent.com/u/229209?v=4","gravatar_id":"","url":"https://api.github.com/users/Plasma","html_url":"https://github.com/Plasma","followers_url":"https://api.github.com/users/Plasma/followers","following_url":"https://api.github.com/users/Plasma/following{/other_user}","gists_url":"https://api.github.com/users/Plasma/gists{/gist_id}","starred_url":"https://api.github.com/users/Plasma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plasma/subscriptions","organizations_url":"https://api.github.com/users/Plasma/orgs","repos_url":"https://api.github.com/users/Plasma/repos","events_url":"https://api.github.com/users/Plasma/events{/privacy}","received_events_url":"https://api.github.com/users/Plasma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-12T11:02:11Z","updated_at":"2018-04-16T06:25:57Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm using .NET Core 2, targeting .NET 4.6.1, with Kestrel + IIS Integration.\r\n\r\nWe have an internal application that:\r\n\r\n1) Has a route that will perform some CPU heavy work inline (no task). Sometimes this route will also launch and async/await on another task to complete, that may take 5-10 seconds.\r\n\r\n2) We have a \"fast\" route, that only pings a database, and returns in 10ms, using async/await.\r\n\r\nOften, we notice route 2 will take an extra few seconds to complete (likely around the async/await).\r\n\r\nI'm wondering whether, when route 2 does an await, does its completion get scheduled on the therad pool thread that is currently processing (and CPU blocked) for thread 1?\r\n\r\nIs that a possibility? I'm trying to identify why the delays are occurring on an otherwise fast route. \r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments/381492479","html_url":"https://github.com/aspnet/KestrelHttpServer/issues/2484#issuecomment-381492479","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/2484","id":381492479,"user":{"login":"tmds","id":1025424,"avatar_url":"https://avatars1.githubusercontent.com/u/1025424?v=4","gravatar_id":"","url":"https://api.github.com/users/tmds","html_url":"https://github.com/tmds","followers_url":"https://api.github.com/users/tmds/followers","following_url":"https://api.github.com/users/tmds/following{/other_user}","gists_url":"https://api.github.com/users/tmds/gists{/gist_id}","starred_url":"https://api.github.com/users/tmds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmds/subscriptions","organizations_url":"https://api.github.com/users/tmds/orgs","repos_url":"https://api.github.com/users/tmds/repos","events_url":"https://api.github.com/users/tmds/events{/privacy}","received_events_url":"https://api.github.com/users/tmds/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T06:25:57Z","updated_at":"2018-04-16T06:25:57Z","author_association":"CONTRIBUTOR","body":"The default info logging shows request finish times:\r\n```\r\ninfo: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]\r\n      Request starting HTTP/1.1 GET http://localhost:5000/  \r\ninfo: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]\r\n      Request finished in 0.0679ms 200 \r\n```\r\n\r\nTo investigate further, what you can do is (without IIS):\r\n- Use a client to verify the fast route is always fast.\r\n- Then add another (separate) client that calls the slow route, and see how that affects the fast route."}}
{"actor":{"display_login":"tmds"}}