Request Demo

SQL Server Severity 17 Error 8657

SQL Server Error 8657, Severity 17  is usually associated with the following message:  "A worker thread was not available to process a request."  This error occurs when SQL Server has exhausted its pool of worker threads that are used to process incoming tasks. Every query or task in SQL Server requires a worker thread, and under high concurrency or misconfigured server settings, all available threads can be consumed. As a result, subsequent requests cannot be processed.  The default maximum number of worker threads in most installations is determined by system configurations such as the number of processors (logical CPUs). However, poorly optimized queries, excessive external connections/applications placing load on the database server, resource bottlenecks (e.g., CPU/Memory), or bad configurations may cause this threshold to be reached.

Common causes: 

  1. High concurrency workload, A large number of simultaneous connections are trying to execute workload intensively. 
  2. Long-running queries, Queries executing for too long can occupy resources while waiting for execution completion. 
  3. Blocking issues, Deadlocks or blocking sessions consuming active workers. 
  4. Misconfiguration, Default settings might not support edge use cases requiring higher levels of threading capability. 
  5. Insufficient hardware resources, High CPU usage leading to scheduler contention, Inadequate memory or I/O throughput causing delays/freezing up existing threads.  

 Troubleshooting Guidance:  

Check Current Workload, run these scripts below from an administrative session. Check active sessions and their states.

SELECT session_id, blocking_session_id, status, wait_type, command, db_name(database_id) AS database_name, program_name
FROM sys.dm_exec_requests; 

SELECT *  
FROM sys.dm_os_schedulers  
WHERE is_online = 1 and runnable_tasks_count > 1;