We recently published a detailed guide on tuning the IIS thread pool, to help fix thread pool starvation issues and 503s queue full errors.
The IIS thread pool
This thread pool is often misunderstood, and confused with other thread pools including the CLR thread pool, Classic ASP thread pool, and so forth.
As a result, people often believe that IIS thread pool issues are responsible for slow requests or ASP.NET website hangs … which is not the case!
In fact, IIS threads have nothing to do with most hangs. However, thread pool exhaustion in the IIS threadpool can lead to other issues, including lowered RPS for high traffic sites, or 503 Queue Full errors.
Fixing IIS thread pool exhaustion
I go into detail on how IIS thread pool exhaustion, or starvation, can affect your IIS site’s performance. In particular, how it can cause queueing issues in the application pool queue.
We also dig into when you need to configure the IIS thread pool to change the number of threads in the pool, and when you don’t.
(Hint: most of the the time changing the thread pool size is not necessary.)
I also wrote about the exact thread pool starvation causes we’ve observed over the course of diagnosing performance issues in over 30K sites over the last decade. During this time, we built automatic diagnostics for IIS thread pool issues, diagnosing most of them down to the app code.
This is actually tricky to do, because most of the time the code triggers IIS threadpool issues indirectly, for example by overloading the CPU which then causes IIS threads to take longer to dequeue requests.
Monitoring the IIS thread pool
Even if you don’t have LeanSentry diagnostics on your IIS server, you can still monitor IIS thread pool issues using performance counters.
I share some of the specific, and simple, ways you can do that in the guide.
Get the guide
For the details, check out the full guide at IIS thread pool (Expert guide).