Sql-server – Blocking in AG that causes app not to launch

availability-groupssql server

If lag between primary and secondary is huge, then can it cause persistent blocking on app sessions? Coz recently we had an issue where blocking sessions were having wait type as HADR_SYNC_COMMIT and there was lag for one of the DB in AG.

So we failover to Secondary even though the lag was pretty high. After DB coming online on new Primary, issue got resolved.

But today the issue happened again. Can you please help.

Best Answer

As addition to Tony's comment this MSDN post can help you with performance counters and latency factors.

Also, verify one of the known issue (lag) "redo blocking on secondary due to schema changes on primary", you can verify that via built-in Xevent's session or follow these steps for validation of redo blocking and quick fix.