Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7,C#
Expertise: Intermediate
Aug 22, 2002

Reduce Server Too Busy errors with the httpRuntime tag

The httpRuntime tag in ASP.NET configuration files lets you determine several features of ASP.NET at the machine or site level, including the how ASP.NET uses multi-threading. Here's the complete syntax for this tag:

<httpRuntime executionTimeout="seconds"
             maxRequestLength="kbytes"
             minFreeThreads="numberOfThreads"
             minLocalRequestFreeThreads="numberOfThreads"
             appRequestQueueLimit="numberOfRequests" 
             useFullyQualifiedRedirectUrl="true|false"  />
minFreeThreads is the minimum number of threads that must be free for ASP.NET to accept a request. The default value is 8, so ASP.NET normally rejects a request if there are 7 or fewer free threads. This setting lets you prevent stalls when your site accepts a request that creates additional threads. On the other hand, if you know that your .aspx pages don't spawn additional threads, or spawn fewer than 7 threads, you can decrease this value and indirectly let ASP.NET server more pages at the same time. This trick can significantly improve your site's scalability.

minLocalRequestFreeThreads is like the minFreeThreads attribute, but it's applied to local requests, which often issue child requests.

Finally, appRequestQueueLimit is the maximum number of requests that ASP.NET can queue for the application when there aren't enough free threads to serve it. Any request that arrives when the queue is full is rejected with a 503-Server Too Busy error. You can safely increase this number if your typical .aspx page takes a very short time to complete.


This tips has been taken from Chapter 24 "ASP.NET Applications" of Francesco Balena's Programming Microsoft Visual Basic .NET (Microsoft Press). Read a sample chapter from our Book Bank, or buy at 30% off the list price.
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap