Reputation: 5917
I have a page that takes a few minutes to run. When I set debug="false"
in the <compilation />
tag in web.config, I get a "Request timed out." error (and internal try/catch blocks in my code get a "Thread was being aborted." error.
What is the fix to allow long pages to run in production mode? Does debug mode have an infinite timeout?
Upvotes: 6
Views: 4461
Reputation: 32960
You should just need to increase the script timeout for page executions. It defaults to 90 seconds, so if you need more time, change it in the following system.web element (executionTimeout attribute):
<httpRuntime executionTimeout="seconds"
maxRequestLength="kbytes"
minFreeThreads="numberOfThreads"
minLocalRequestFreeThreads="numberOfThreads"
appRequestQueueLimit="numberOfRequests"
useFullyQualifiedRedirectUrl="true|false" />
Upvotes: 5
Reputation: 96561
You can set the max. duration for requests in web.config:
<system.web>
...
<httpRuntime executionTimeout="600" />
Where executionTimeout specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET. Details can be found here.
Upvotes: 5