I have an Azure Web App that I suspect is running into a max connection limit (i.e. maximum number of HTTP requests that can be active at the same time).
How does one modify the maximum number of simultaneous web requests in an Azure Web Application?
Is there a way to monitor connection queues in Azure?
First thing to check: are you using static HttpClient? If not, I would fix that first, then re-run your load test.
Long story short, you shouldn't need to modify the maxconnection settings. The max is set by the version of .NET and it is a very, very high number. If you suspect you are running out of sockets, you should do a load test and measure number of SocketExceptions.
Since we're in the topic of resource constraints, are you also using async calls. Specifically, async in your WebAPI controller down to every dependency in your codebase.
private static HttpClient Client = new HttpClient();
As a best practice, you should consider using HttpClientFactory to handle managing the lifetime of HttpClient instances as described in https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With