Resolving an Availability Group Sync Issue - HADR_AR_CRITICAL_SECTION_ENTRY
Symptoms:
- AG databases are not synchronizing.
- Databases on the primary replica are not available.
- Any attempt to change the availability group on the primary replica (for example suspend AG, remove AG database, change to manual failover mode) end up suspended with wait type HADR_AR_CRITICAL_SECTION_ENTRY.
- There may be messages in the SQL log of the primary replica showing processes being killed like below. These processes are stuck in killed/rollback state and blocking other background processes.
Process ID 77 was killed by an ABORT_AFTER_WAIT = BLOCKERS DDL statement on database_id = 54, object_id = 0.
- In our case, there was no issue on the secondary replicas. We could suspend AG on the secondary databases, no blocking or killed processes. The only issue was the secondary AG databases were not synchronizing due to primary databases not being available.
Resolution:
The only solution we found was to restart the SQL instance of the primary replica. However, even a normal restart of the SQL service from the config manager was hanging on "stopping service". We had to force SQL to stop by using the TSQL command "SHUTDOWN WITH NOWAIT". After bringing SQL back online, the databases were available again and AG was in sync and healthy.
SQL Server Database Consulting Services
Ready to future-proof your SQL Server investment?
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Troubleshooting SSPI handshake error
Troubleshooting SSPI handshake error
Dec 5, 2011 12:00:00 AM
1
min read
Powershell error: sqlps.ps1 cannot be loaded because running scripts is disabled on this system
Powershell error: sqlps.ps1 cannot be loaded because running scripts is disabled on this system
Jun 5, 2018 12:00:00 AM
4
min read
How to fix SQL backup to URL failure - operating system error 50

How to fix SQL backup to URL failure - operating system error 50
Apr 29, 2019 12:00:00 AM
2
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.