Automatic Failover Not Working in AlwaysOn AG

I had set up a two-node AlwaysOn AG environment with a File Share witness and everything seemed OK. I could perform manual failovers using the wizard and the dashboard showed the environment was healthy. I had selected the Synchronous-Commit mode with automatic failover so I decided to try it out. However, when I stopped SQL Server Service using SQL Server Configuration Manager on the Primary, the Availability Group VNO did not failover. I spent a while on this before I got a tip from the comment on Brent Ozar’s website. When I checked I realized the issue.

000007f4.00002320::2016/07/07-06:10:59.654 WARN [RCM] Not failing over group <AG Group>, failoverCount 25, failoverThresholdSetting 20, lastFailover 1601/01/01-00:00:00.000

Because I had been testing, my failover count had exceeded the threshold. So I set theĀ Maximum Failures in the specified Period for the Availability Group Cluster Role to a much higher value and my Automatic Failover succeeded. It is incredible fast.