After all the reading this is what I understood. Is it correct?
LeaseTimeout
is a simple heartbeat between SQL Server resource DLL and the SQL Server instance.
HealthCheck
Timeout is related to sp_server_diagnostics
run.
Why do we have two timeouts?
Also how do I change the LeaseTimeout? Is it through the cluster manager because I couldnt find any T-SQL command like below for HealthCheck Timeout
ALTER AVAILABILITY GROUP AG1 SET (HEALTH_CHECK_TIMEOUT = 40000);
Best Answer
sp_server_diagnostics
execution.There are two timeouts because they are for 2 different mechanisms for health of the WSFC and SQL Server. Both are changed via the WSFC property of the AG resource, picture is shown in the linked article above.