Configure TCP reset and idle timeout for Azure Load Balancer
Article
Azure Load Balancer rules have a default timeout range of 4 minutes to 100 minutes for Load Balancer rules, Outbound Rules, and Inbound NAT rules. The default setting is 4 minutes. If a period of inactivity is longer than the timeout value, there's no guarantee that the TCP or HTTP session is maintained between the client and your service.
The following sections describe how to change idle timeout and tcp reset settings for load balancer resources.
Select the resource group for your load balancer. In this example, the resource group is named myResourceGroup.
Select your load balancer. In this example, the load balancer is named myLoadBalancer.
In Settings, select Load balancing rules.
Select your load-balancing rule. In this example, the load-balancing rule is named myLBrule.
In the load-balancing rule, input your timeout value into Idle timeout (minutes).
Under TCP reset, select Enabled.
Select Save.
To set the idle timeout and tcp reset, set values in the following load-balancing rule parameters with Set-AzLoadBalancer:
IdleTimeoutInMinutes
EnableTcpReset
If you choose to install and use PowerShell locally, this article requires the Azure PowerShell module version 5.4.1 or later. Run Get-Module -ListAvailable Az to find the installed version. If you need to upgrade, see Install Azure PowerShell module. If you're running PowerShell locally, you also need to run Connect-AzAccount to create a connection with Azure.
Replace the following examples with the values from your resources: