Setting timeouts aggressively

If some of your pages access an external resource synchronously such as a web service and the external resource slows down dramatically, then those pages will start timing out. This is good, because otherwise they keep blocking the thread.

However, the default timeout is 110 seconds in .NET 2.0 or higher, and 90 seconds in .NET 1.0 and 1.1. On a busy site with requests waiting for threads to become available, having threads blocked for 110 seconds may be too long.

Setting the timeout to, for example 30 seconds, may not result in many more timeouts, while you get better use of the available threads.

Timeouts are set in web.config, via the executionTimeout attribute of element httpRuntime:

<system.web> <httpRuntime executionTimeout="30" ...

Get ASP.NET Site Performance Secrets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.