O'Reilly logo

ASP.NET Site Performance Secrets by Matt Perdeck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required