{"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":24,"created_at":"2016-12-13T01:11:06Z","updated_at":"2016-12-21T00:50:08Z","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/268402848","html_url":"https://github.com/aspnet/IISIntegration/issues/311#issuecomment-268402848","issue_url":"https://api.github.com/repos/aspnet/IISIntegration/issues/311","id":268402848,"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},"created_at":"2016-12-21T00:50:08Z","updated_at":"2016-12-21T00:50:08Z","body":"I thought that recycling so often is not a good idea, but I have no other way of keeping out site running. \r\nI don’t have the network logs for the timeouts from yesterday, but I think the log will look identical to the screenshot I posted 5 days ago:\r\n![502-screenshot3](https://cloud.githubusercontent.com/assets/12072954/21236963/0c9e8162-c2cb-11e6-8c36-674845a528b4.png)\r\nDoes the above log tell you anything?\r\nWhat about the misleading 502 errors from IIS when client drops the connection? It’s not as important as the timeouts, but still would be nice to know if this is a “normal “ behavior for IIS.\r\n\r\nThanks.\r\n"}}
{"actor":{"display_login":"RLaptev"}}