Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Request timed out." error when setting debug="false"

Tags:

asp.net

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?

like image 793
JerSchneid Avatar asked May 26 '09 15:05

JerSchneid


2 Answers

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"  />
like image 145
jrista Avatar answered Sep 26 '22 12:09

jrista


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.

like image 20
M4N Avatar answered Sep 26 '22 12:09

M4N