I’m currently building an app using Azure Linux VMs with .Net Core and I’m facing an issue when sending http requests from an Azure VM to a remote server.
When making a http request from an Azure Linux OR Windows VM (CURL and .NET Core) to a remote server (Debian Linux NOT in Azure) the request fails with 408 Request Timeout and the message “Server timeout waiting for the HTTP request from the client.”. When executing this same request locally using CURL, Postman or from .Net Core it succeeds. This requests also works fine when executed within a Linux VM in AWS and GCP. It even works in Azure Functions…
Here is my test setup:
Request 1 (Small)
HTTP Post with a request body that has a content length of 306
Average response time is 4s on my local machine with a response size of 20mb
Request 2 (Large)
HTTP Post with a request body that has a content length of 5962
Average response time is 5s on my local machine with a response size of 14mb
Locally both requests work fine.
In AWS and GCP Linux VMs both request work fine.
In Azure Linux VM (Standard B2s) the small consistently works and the large one consistently fails with 408
In Azure Windows VM (Standard DS1 v2) both consistently fail with 408
In Azure Functions both consistently work
All test machines as well as the remote endpoint that gets called are located in Europe.
This is why I currently suspect there must be something going on (or a misconfiguration on my side) in Azure VM or Azure Networking that causes this behavior. I already tried raising the Timeout of my HttpRequest in .Net Core without success (as expected as it also fails in CURL using SSH).
Is there anyone that can help me work around this or point me towards documentation? Is this a known issue?