I was surprised to find out that Azure enforces a slient TCP connection timeout, which is by default set to 4 mintues. I need to change this, as we're running long-running TCP connections and no communication should be sent to conserve power on embedded devices.
There are a couple of guides online (https://azure.microsoft.com/en-us/blog/new-configurable-idle-timeout-for-azure-load-balancer/), but they all cover cases where the VMs are provisioned using the Service manager (Classic). So changing this in Classic is not an issue, but we're already running the VMs provisioned via the Resource Manager.
After running:
Switch-AzureMode AzureResourceManager
Get-AzureVM -Name "MyVM" -ResourceGroup "MyGroup" | Get-AzurePublicIpAddress
I get the configuration printout for the IP, with IdleTimeoutInMinutes
set at default 4
.
Changing this using:
Get-AzureVM -Name "MyVM" -ResourceGroup "MyGroup" | Get-AzurePublicIpAddress | Set-AzurePublicIpAddress -IdleTimeoutInMinutes 29
fails with: A parameter cannot be found that matches parameter name `IdleTimeoutInMinutes`
.
A guide or suggestion how to go forward will be appreciated. Should I remove the IP and create a new one? There surely is a better way.