Waits

THREADPOOL Waits: When SQL Server Runs Out of Workers

2025-10-31 路 3 min

SQL Server is like an organism that breathes through worker threads. Each worker is a breath; without them, the system suffocates.

When you see THREADPOOL in sys.dm_os_wait_stats, SQL Server may be struggling for air. This is not an ordinary wait: it can indicate that the engine cannot allocate additional workers because available threads are occupied by parallel tasks, blocking chains, or other work.


馃攳 Inspect the DMV

1
2
3
4
-- sprawd藕 obci膮偶enie puli w膮tk贸w
SELECT scheduler_id, current_tasks_count, runnable_tasks_count, active_workers_count, work_queue_count
FROM sys.dm_os_schedulers
WHERE scheduler_id < 255;

馃搳 Interpretation: