This problem might occur because ASP.NET limits the number of worker threads and completion port threads that a call can use to execute requests.
Typically, a call to a Web service uses one worker thread to execute the code that sends the request and one completion port thread to receive the callback from the Web service. However, if the request is redirected or requires authentication, the call may use as many as two worker and two completion port threads. Therefore, you can exhaust the managed ThreadPool when multiple Web service calls occur at the same time.
For example, suppose that the ThreadPool is limited to 10 worker threads, and all 10 worker threads are currently executing code that is waiting for a callback to execute. The callback can never execute because any work items that are queued to the ThreadPool are blocked until a thread becomes available.
Another potential source of contention is the maxconnection parameter that the System.Net namespace uses to limit the number of connections. Generally, this limit works as expected. However, if many applications try to make many requests to a single IP address at the same time, threads may have to wait for an available connection.
Back to the top
To resolve these problems, you can tune the following parameters in your Machine.config file to best fit your situation: • maxWorkerThreads
To successfully resolve these problems, do the following: • Limit the number of ASP.NET requests that can execute at the same time to approximately 12 per CPU.
• Permit Web service callbacks to freely use threads in the ThreadPool.
• Select an appropriate value for the maxconnections parameter. Base your selection on the number of IP addresses and AppDomains that are used.
Note: The recommendation to limit the number of ASP.NET requests to 12 per CPU is a little arbitrary. However, this limit has proved to work well for most applications.
The customer has only seen this on occassion on a couple of NSes and just wondered whether we had any recommendations regarding Microsoft's recommendations to remedy these warnings. Altiris recommendations looking at the NS/Solution process behind the issue; poorly written reports, collections, wizards … etc.