0

I'm running Classic ASP web application hosted via IIS and everything is set to timeout after 5 minutes.

httpRuntime is set to 300 Server.ScriptTimeout is set to 300

Still a request to generate an excel export which takes more than 2 minutes fails with Gateway Error 502 exactly at the 02:00 minutes.

Looks like there's some setting which has precedence over the above but which?

bigb055
  • 198
  • 3
  • 14
  • IIS connection timeout setting might be relevant. – Flakes Jul 25 '20 at 11:06
  • Check the Application Pool Recycle settings. – user692942 Jul 25 '20 at 11:41
  • Flakes, connectionTimeout is set to 5 minutes. Lankymart, I reset IIS, had not effect. How is recycling different and what should I exactly do with the Recycle settings? – bigb055 Jul 25 '20 at 12:07
  • @bigb055 [What causes an application pool in IIS to recycle?](https://stackoverflow.com/q/302110/692942). – user692942 Jul 25 '20 at 23:59
  • What is generating the request? A browser or something else? If it is something else, does it have a timeout? – Dijkgraaf Jul 26 '20 at 22:59
  • 502 always means a backend application didn't return a correct response after a period of time. Please check your IIS and check the substatus code of 502. The timeout may not come from your IIS but your application. So please check whether any exception was thrown at that time. – Jokies Ding Jul 27 '20 at 06:25
  • Are you able to use the settings to set it to lower than 2 mins? Try using `<% Server.ScriptTimeout=10 %>` on a page and see if it times out after only 10 seconds. – Daniel Nordh Jul 27 '20 at 06:54
  • @DanielNordh If I set it to 10 seconds the request fails again on the 2nd minute in the browser but this time it returns status code 302 "Found" instead of 502.3 "Bad Gateway". My guess is that there's a default wait time for the request set to 2 mins, just I can't find where. – bigb055 Aug 04 '20 at 09:52
  • 1
    Are you able to post some code? Might help figure out the problem. The fact that the error message changes when you set it to 10s, but it still times out after 2 mins makes me think there's something else involved causing the problems for you. – Daniel Nordh Aug 04 '20 at 12:40

0 Answers0