Steven Price
Steven Price

Reputation: 57

Azure App Service Connection Timeout Issue

We have an Azure App Service built in C# .NET 4.7 which works fine when run locally but when we publish to Azure throws the following error back to the calling client (web UI built in vue.js)

Error: connect ETIMEDOUT 52.174.7.133:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14)

The request is terminated by the UI

At the point the error is thrown we have 4 clients calling the App Service to retrieve results every 5 seconds. We can see through logging that the App Service method is stating and completing OK in 2 ms for all calls made , there are no exceptions thrown in the .NET code in the App Service method being called.

The process seems to work fine if we have 3 clients polling the app service method.

If we run the App Service locally we have no problems calling the method 20K times with 10 concurrent calling threads.

It seems to maybe some restriction when hosted in Azure

Any help appreciated

Regards

Steve

Upvotes: 1

Views: 1807

Answers (1)

Tony Ju
Tony Ju

Reputation: 15619

Here are some suggestions for your reference.

1.Are you using static HttpClient? If not, you can use static HttpClient and try again.

2.Scale out your service plan to more instances.

enter image description here

3.Use Diagnose and solve problems tool in Azure portal.

enter image description here

Upvotes: 1

Related Questions