{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311","repository_url":"https://api.github.com/repos/aspnet/IISIntegration","labels_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311/comments","events_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311/events","html_url":"https://github.com/aspnet/IISIntegration/issues/311","id":195132622,"number":311,"title":"Random 502.3 errors","user":{"login":"RLaptev","id":12072954,"avatar_url":"https://avatars.githubusercontent.com/u/12072954?v=3","gravatar_id":"","url":"https://api.github.com/users/RLaptev","html_url":"https://github.com/RLaptev","followers_url":"https://api.github.com/users/RLaptev/followers","following_url":"https://api.github.com/users/RLaptev/following{/other_user}","gists_url":"https://api.github.com/users/RLaptev/gists{/gist_id}","starred_url":"https://api.github.com/users/RLaptev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RLaptev/subscriptions","organizations_url":"https://api.github.com/users/RLaptev/orgs","repos_url":"https://api.github.com/users/RLaptev/repos","events_url":"https://api.github.com/users/RLaptev/events{/privacy}","received_events_url":"https://api.github.com/users/RLaptev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-13T01:11:06Z","updated_at":"2016-12-15T19:13:05Z","closed_at":null,"body":"I started reporting this problem in issue #[201](https://github.com/aspnet/IISIntegration/issues/201), but because it’s already closed, I’m opening a new one.\r\nWe have a dedicated Windows 2008R2 server with IIS7.5 and ASP.NET Core 1.1 RTM (ANCM  v7.1.1970.0) running production site for 3 weeks now.\r\nThere are two issues all linked to a random 502.3 error:\r\n\r\n**Issue 1.** The site would be up and running for a variable amount of time (in hours), but all of a sudden would start constantly returning the following error\r\n`502 – Web server received an invalid response while acting as a gateway or proxy server`\r\nRestarting the site in IIS, or recycling site’s application pool brings the site up, but the problem reoccurs within a few hours or ~30 minutes. As workaround, we configured IIS to recycle app pool every 60 minutes, and that keeps the site up most of the time.\r\n\r\n**Issue 2**. This identical to #[201](https://github.com/aspnet/IISIntegration/issues/201). We see a random 502.3 error in IIS log, while Kestrel log shows 200 status for the same request. This happens to all types of files - static JS/CSS, images and MVC views.\r\n\r\nExample of the log: [fr000011.pdf](https://github.com/aspnet/IISIntegration/files/646615/fr000011.pdf)\r\nThe way I read the above log - IIS couldn't connect to Kestel to retrieve a simple static JPG image, and timed out after 2 minutes. I believe 2 minutes is a default IIS timeout. The site is still up in this case.\r\n\r\nIn both issues you would see the following entry in IIS failed request log:\r\n\r\n`ModuleName=\"AspNetCoreModule\", Notification=\"EXECUTE_REQUEST_HANDLER\", HttpStatus=\"502\", HttpReason=\"Bad Gateway\", HttpSubStatus=\"3\", ErrorCode=\"2147954402\", ConfigExceptionInfo=\"\"`\r\n\r\nThe difference between the two issues is that in a 2nd case you would still see successful request in Kestrel log, but in a 1st case there are NO entries whatsoever in Kestrel log, seems like IIS can’t connect to Kestrel at all. \r\nPerformance is NOT degrading over time. The site is nver under a heavy load. Lots of memory available.\r\nAny suggestions on how to troubleshoot this problem? What could cause IIS to first randomly fail to connect to Kestrel and then constantly fail.\r\nThank you.\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/IISIntegration/issues/comments/267414331","html_url":"https://github.com/aspnet/IISIntegration/issues/311#issuecomment-267414331","issue_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311","id":267414331,"user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T19:13:05Z","updated_at":"2016-12-15T19:13:05Z","body":"That shows that IIS sent the request to Kestrel, but it doesn't show a response. The request appears to be stuck in your application somewhere, and IIS aborts the request after 2 minutes."}}
{"actor":{"display_login":"Tratcher"}}