I already know the answer to this, but wanted to share with the community since it is NOT documented from Microsoft.
The scenario: A surge of traffic hits your IIS 7.5 A
After searching around the internet, I found the following articles from Microsoft that relate to the problem:
KB 821268: Contention, poor performance, and deadlocks when you make Web service requests from ASP.NET applications
This article gives some great performance-tweaking tips, however it fails to mention some some VERY important ceilings that we ran in to.
The solution for us was to modify our machine.config, and populate the following XML nodes:
I purposefully set some of these numbers to "xxx" since they are dependent upon your hardware.
From the KB article above, Microsoft suggests some equations for figuring out these values. However, they fail to mention that the MAXIMUM value for these numbers is the size of an INT, or 32767.
So, the CORRECT equations for figuring these out are as follows:
This solution is not for everyone, and should only be used if you meet the criteria in the KB article.
Another tool we used in helping us diagnose this was an .ASPX page with no code-behind that we could throw out on any server (without resetting the Application Pool). This page uses reflection to tell you what is actually going on in the thread pool, and what the values of these settings render to on your server.
<%@ Page Language="C#" %>
<%
Response.Cache.SetCacheability(HttpCacheability.NoCache);
int worker, workerMIN, workerMAX;
int port, portMIN, portMAX;
System.Threading.ThreadPool.GetAvailableThreads(out worker, out port);
System.Threading.ThreadPool.GetMinThreads(out workerMIN, out portMIN);
System.Threading.ThreadPool.GetMaxThreads(out workerMAX, out portMAX);
%>