FIX: Thread pool exhaustion and CMEMTHREAD contention in AAG with data seeding in SQL Server 2016 and 2017

Van toepassing: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core

Symptoms


In Microsoft SQL Server 2016 and 2017 Always On Availability Group (AAG), when the data seeding feature is enabled, the following issues occur:

  • HADR (High availability and Disaster recovery) worker threads suddenly increase a lot and reach exhaustion with an error message:

"The thread pool for Always On Availability Groups was unable to start a new worker thread because there are not enough available worker threads."

  • CMEMTHREAD wait type occurs.
  • Massive transaction blocking.

Resolution


This issue is fixed in the following cumulative updates and service pack for SQL Server:

       Cumulative Update 4 for SQL Server 2017

       Cumulative Update 6 for SQL Server 2016 SP1

Service pack information for SQL Server 2016

This issue is fixed in the following service pack for SQL Server:

       Service Pack 2 for SQL Server 2016

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology that Microsoft uses to describe software updates.