Sql-server – Always ON synchronization issue

availability-groupssql-server-2017

I'm having a bad issue with Always ON on a SQL Server 2017 CU3 running on Windows Server 2016 with last cumulative updates (March 2018).
Availability Mode is set to Synchronous commit and when I reboot the secondary node some DBs (randomly) get in a "Not Synchronized" state and they can't go back to "Synchronized".
Everything looks OK, I have another SQL installation with same patching level and Os and it's working fine.
I don't have specific errors on the event viewer. Antivirus is disabled, the nodes are on the same network and they look ok.
I tried to raise the session timeout to 20s but this didn't solve the issue.
Do you have any idea or suggestion?

Best Answer

I had the same issue on SQL Server 2017 CU 11 (latest as of today) with Windows Server 2016. After rebooting the secondary replica, some of the databases in the AG show not synchronizing. I used ALTER database SET HARD RESUME, but it didn't work. The work around is to restart the SQL Server Services on the secondary replica. Then all databases show synchronized again.