It is possible to set the timeout of VM endpoints up to 30 minutes. By default, the timeout is 4 minutes.
PowerShell command to do this is:
Get-AzureVM -ServiceName "MyService" -Name "MyVM" | Set-AzureEndpoint -Name "MyEndpoint" -IdleTimeoutInMinutes 30 | Update-AzureVM
Here is the reference: dn495219(v=azure.100)