What’s the issue?
Each replica in an Always On Availability Group has a session timeout value, configured per replica through the SESSION_TIMEOUT option, which controls how long the replica waits for a response from another replica before declaring the connection lost. The default value is 10 seconds, set when the replica is created and rarely changed unless explicitly tuned.
When a replica does not receive a ping or other expected message from its partner within the session timeout window, SQL Server treats the connection as failed and may take action depending on the AG’s failover mode and availability mode. In synchronous commit configurations with automatic failover, this can include initiating a failover.
This finding identifies replicas configured with a session timeout of 10 seconds or less, which is the default and lower than what we recommend for stable AG operation in most environments.
Why is this a problem?
A 10 second session timeout is sensitive to brief network disruptions that are common in real environments. Network blips, switch reconfigurations, virtual machine vMotion or live migration events, and similar transient conditions can easily exceed 10 seconds without indicating any actual failure of the replica or the underlying host.
When the session timeout is exceeded, the AG may initiate an unnecessary failover, drop a secondary out of synchronization, or generate a flurry of error log entries that obscure other issues. In automatic failover configurations, this can produce an unplanned role change in response to a network event that would have resolved on its own within a few additional seconds.
The resulting failover then triggers application reconnections, listener target changes, and the operational overhead of returning the AG to its desired state, all of which is disruption that was not actually warranted by an underlying failure.
In our experience, raising the session timeout to 15 seconds or higher reduces the rate of false positive failures and unnecessary failovers without meaningfully delaying response to genuine outages. The tradeoff is small (a few extra seconds before reacting to a real failure) compared to the disruption avoided from transient network events.
What should you do about this?
Increase the session timeout to 15 seconds or higher using ALTER AVAILABILITY GROUP [AGName] MODIFY REPLICA ON N’ReplicaName’ WITH (SESSION_TIMEOUT = 15);. The change takes effect immediately and does not require a restart or any disruption to running databases. Apply the same value consistently to every replica in the AG so behavior remains symmetric regardless of which replica is currently primary.
In environments with known network instability, distance between replicas, or virtualization patterns that produce longer pauses, consider higher values such as 20 or 30 seconds. The right value balances tolerance for transient events against responsiveness to genuine failures, and it is worth tuning based on actual observed network behavior rather than guessing.
Read more…
Modify session-timeout for an availability group replica – SQL Server Always On | Microsoft Learn