Welcome to MSDN Blogs Sign in | Join | Help

WebTopics

IIS and ASP.NET Information and Tips from Microsoft Developer Support

News

  • All posts are provided "AS IS" with no warranties, and confer no rights. All the expressions expressed herein are entirely the bloggers own and not necessarily those of Microsoft. In addition, thoughts and opinions often change. Because a weblog is intended to provide a semi-permanent point-in-time snapshot, you should not consider out of date posts to reflect current thoughts and opinions.
ASP.net Hang in IIS 7.0

When hosting an ASP.net web application on IIS7, and you have the application running in integrated pipeline mode, you may find that users complain that the application performs slowly.  This may occur if your website is busy, handling 12 or more requests concurrently, and those requests are handled asynchronously as opposed to synchronously.  The same application may appear to not suffer from poor performance when hosted on an IIS 6.0 server, or if the IIS7 site is set to run in Classic mode. 

 

If you were to look at the currently executing requests in the IIS Manager by using the Request Monitor feature, you may see 12 requests currently in the ExecuteRequestHandler state, and all of the other requests waiting in the BeginRequest state:

 

 

The behaviour occurs because beginning in IIS7, when an ASP.net application runs in Integrated mode there is a restriction on the number of concurrently executing requests per CPU.  By default, the limit to the number of concurrently executing ASP.net requests is 12.  You can modify this limit by setting the MaxConcurrentRequestsPerCPU registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727 to a value higher than 12.  NOTE: By default, this registry key does not exist.  You will need to create it manually as a DWORD and give it a value.  The value you should give it depends on your application load and how many concurrent requests are expected. 

 

 

For a more detailed explanation of how ASP.net threading works in IIS6 and IIS7, please see:

 

ASP.NET Thread Usage on IIS 7.0 and 6.0

http://blogs.msdn.com/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx

 

AND

 

Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications

http://support.microsoft.com/kb/821268

Posted: Friday, February 13, 2009 11:40 AM by Mike Laing

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker