We have an issue where we are seeing ASP pages run for 30-45 minutes even though the Server.ScriptTimeout value is 90 seconds. We have even verified this by printing to the page the value of Server.ScriptTimeout to make sure we are not changing the value somehow.
We are working on what is causing certain pages to randomly run for this long. But I'm also trying to determine how an ASP page is able to run for longer than the Server.ScriptTimeout value?
It seems that the scripttimeout is overwritten at some point. To narrow it down, what happens if you try running a long running task on another fresh page? A pause in Classic ASP is fairly difficult to do, but try WaitFor for that: http://www.scriptswave.com/free-scripts-download/waitfor/5932.html
If you can confirm that the scripttimeout is honored in a parallel page, try a copy of your live page and add a wait at the top and see what happens ... then move your wait down the code until eventually it doesn't honor the scripttimeout value.
This will help narrow down whether it's something with all pages on that server or whether it's the one page. And, if it's the one page, it will help determine where in the page the change in timeout value begins.
Just taking a stab in the dark on this one but if ASP's
Server.ScriptTimeout
is anything like PHP'smax_execution_time
and your excessive-runtime script involves calls to remote services, there's a good chance that your timeout value does not factor in time which your CPU is idling while it waits on a call to the other service(s). (the Server.ScriptTimeout MSDN entry is a little sparse on Server.ScriptTimeout's behavior in this case)This would create problems when a web service is responding unexpectedly (i.e. a redirect loop) so, if your script depends upon remote services, it may be a good idea to debug calls to the remote services as well.
Been a while since got my Classic ASP on... Does what you see for
Server.ScriptTimeout
match what you see in IIS Manager for ASP Script Timeout value? (assuming IIS6 for that link)