The thread pool for AlwaysOn Availability Groups was unable to start a new worker thread because there are not enough available worker threads. This may degrade AlwaysOn Availability Groups performance.

Kranthi DBA 221 Reputation points
2021-07-31T14:07:01.993+00:00

I am seeing the below error within the SQL logs on a server with 8 CPU cores.
Currently the max worker thread value is set to default.
There is a single Availability group with 200 Databases that are part of the AG.
Please advise what is the best value that we can set for the "Max worker thread" to resolve the issue.

  • Error message: The thread pool for AlwaysOn Availability Groups was unable to start a new worker thread because there are not enough available worker threads. This may degrade AlwaysOn Availability Groups performance. Use the "max worker threads" configuration option to increase number of allowable threads.
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,933 questions
0 comments No comments
{count} votes

Accepted answer
  1. Cris Zhan-MSFT 6,611 Reputation points
    2021-08-02T07:43:30.343+00:00

    Hi,

    According to this article, the minimum worker thread for an availability group with 200 databases is 601. In your environment, the number of CPUs is 8, and the maximum number of worker threads configured by SQL Server by default is 576.
    https://www.sqlshack.com/max-worker-threads-for-sql-server-always-on-availability-group-databases/

    Changing the maximum number of worker threads may provide limited performance assistance. A more effective way is to reduce the system load or upgrade the hardware (increase the number of CPUs).

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Erland Sommarskog 102.4K Reputation points
    2021-07-31T15:19:41.073+00:00

    It is very rarely a good idea to change the value "max worker thread" directly. What you can do to increase the number of workers is to add more cores to the system, and I think that you need to do that. 200 databases in an AG is lot. And then I mean LOT!

    2 people found this answer helpful.
    0 comments No comments