THREADPOOL is one of the most serious wait types in SQL Server. It means all worker threads are occupied and incoming requests cannot get a thread to execute on. Those requests do not run slowly, they do not run at all. They queue up and wait. If the situation persists, they time out and return errors to the application. Logins need a worker too, so new connections can fail while it lasts.
Unlike most waits that represent a query being slow, THREADPOOL represents the entire server being unable to accept new work.
Is This Wait Expected?
In short bursts, yes. Short THREADPOOL waits are normal while the instance creates threads to meet a sudden need for more of them. On our SQL Server 2025 lab, nowhere near its 576-worker limit, it logged 7,978 of them in under two hours, averaging about 4 ms and peaking at 223 ms. What is not normal is starvation: no worker free at all, and requests queuing for seconds. Judge it by avg_wait_ms and max_wait_time_ms against your own baseline, not by whether the counter is above zero.
If THREADPOOL is currently active (you can see it in sys.dm_os_wait_stats and growing rapidly), treat it as an incident, not a tuning problem.
What Worker Threads Are
SQL Server maintains one pool of worker threads for the whole instance, not a quota per scheduler. Its size, max_workers_count, is worked out at startup from the number of logical CPUs and the architecture, or set explicitly via sp_configure. A 64-bit server with 8 logical CPUs gets 576.
Each active request needs at least one worker thread and gives it back when the request finishes; an idle connection holds none. A parallel query reserves up to its runtime DOP in workers for every branch that runs at the same time, plus its coordinating thread. A request waiting on a lock, an I/O or a latch keeps its worker for as long as it waits.
When all threads are occupied, the next incoming request hits THREADPOOL and waits.
Root Causes
Blocking consuming threads, the most common cause. Sessions that are blocked waiting for locks (LCK_M_X, LCK_M_S) hold their worker threads while blocked. If a head blocker causes 50 sessions to pile up behind it, those 50 sessions each occupy a thread. On a server with hundreds of blocked sessions, the thread pool can be exhausted entirely. This is why long blocking chains are so dangerous, they do not just slow down the blocked queries, they can exhaust the thread pool and bring the whole server down.
Too many concurrent connections each doing work, connection pooling misconfiguration can create far more concurrent connections than necessary. If each pool sends 50 connections and each connection is actively executing, a server with 50 pools can have 2,500 active requests, which may exceed max worker threads.
High MAXDOP with many concurrent parallel queries, a single parallel query at DOP 8 reserves up to 8 worker threads for every branch running at once, plus its coordinating thread. Microsoft’s own example plan, two concurrent branches at MAXDOP 8, reserved 16. If 50 users run plans like that at the same time, that is more than 800 threads from parallel queries alone, before accounting for OLTP sessions.
Service Broker activation threads, Service Broker internal activation can create many threads. Misconfigured activation procedures that loop indefinitely can exhaust the thread pool.
How To Diagnose It
Check how close you are to thread exhaustion right now:
SELECT
SUM(active_workers_count) AS active_workers,
SUM(runnable_tasks_count) AS runnable_tasks,
si.max_workers_count
FROM sys.dm_os_schedulers s
CROSS JOIN sys.dm_os_sys_info si
WHERE s.status = 'VISIBLE ONLINE'
GROUP BY si.max_workers_count;

Track the gap between active_workers and max_workers_count on your own server so you know what a normal day looks like; a gap that keeps closing is the warning. If they are equal, you are in a THREADPOOL situation right now.
Find what sessions are doing:
SELECT
r.status,
COUNT(*) AS session_count
FROM sys.dm_exec_requests r
GROUP BY r.status
ORDER BY session_count DESC;
A large count of suspended sessions, especially with blocking_session_id > 0, means blocking is the cause. A large count of running or runnable sessions means actual concurrent load is the cause.
Count blocked sessions:
SELECT COUNT(*) AS blocked_sessions
FROM sys.dm_exec_requests
WHERE blocking_session_id > 0;
If blocked sessions are a large share of all requests, and far more than on a normal day, blocking is the thread pool driver.
Find the head blocker with Get Blocking Summary: copy the T-SQL from the post and run it in SSMS.
Check max workers configuration:
SELECT name, value_in_use, description
FROM sys.configurations
WHERE name = 'max worker threads';
value_in_use = 0 means SQL Server auto-configures. Check max_workers_count from sys.dm_os_sys_info to see the computed limit.
What To Do
If it is happening right now, stop the bleeding first:
- Find the head blocker causing the blocking chain and kill it:
KILL [session_id]; -- the head blocker session
This releases all blocked sessions, which release their threads. Do not kill random sessions, find the head blocker first. If new connections are failing, connect with the dedicated administrator connection (DAC) to find and kill it; Microsoft’s max worker threads page gives the same advice.
- If it is not a blocking problem but a load problem: identify the application sending the most concurrent requests and throttle it at the connection pool level while you investigate.
Fix the underlying causes:
For blocking-driven THREADPOOL:
- Investigate and fix the blocking root cause (see
LCK_M_Xpost) - If the blocked sessions are readers waiting on writers (
LCK_M_Sbehind anLCK_M_X), read committed snapshot isolation (RCSI) can remove that conflict. It has a cost: row versions are kept in tempdb’s version store, and readers get the last committed version instead of waiting, which changes what the application reads. Test it with the application first; it does nothing for writers blocking writers - Shorten transaction scope in applications
For connection pool over-provisioning:
- Reduce max pool size in application connection strings
- Review whether all connections are necessary, idle pooled connections do not consume threads, but active connections do
- Set connection timeouts so stale connections fail fast
For parallel queries holding the workers:
- Confirm it first: many requests each holding several tasks in
sys.dm_os_tasks, and the same statements showingmax_dopabove 1 insys.dm_exec_query_stats - Fix those queries or their indexes before touching a setting; one query going parallel is a query problem
- If many different queries show the same pattern, review
max degree of parallelismand cost threshold for parallelism as a tested change, using MAXDOP and Cost Threshold - Use Resource Governor to limit DOP per workload group
Raising max worker threads, this is a last resort, not a first response. If you raise the limit without fixing the root cause, you just move the ceiling:
EXEC sp_configure 'max worker threads', 2048;
RECONFIGURE;
The 2048 is an example, not a target. The default auto-configuration is usually appropriate. Raising it makes sense only if you have verified the workload genuinely needs more threads and the root causes (blocking, pool misconfiguration) have been addressed.
Where To Go Next
If THREADPOOL is showing up in your wait stats, these are the next places to look.
- Get-WaitStatistics, the overview script; THREADPOOL appearing here means it already happened
- Get-BlockingSummary, first thing to check when THREADPOOL is active
- SQL Server High CPU, the symptom router: start here when CPU is pinned
- SQL Server Agent Jobs Queued on Maximum User Working Threads, the Agent limit with almost the same name: jobs queued with [398] are not engine worker threads, and raising max worker threads will not help
Leave a Reply