Test Internal Server Error Message : The operation was canceled.

Veeresh Byahatti 1 Reputation point
2022-09-06T06:13:34.473+00:00

I am trying to figure out why I am getting the "Test Internal Server Error Message : The operation was canceled." intermittently on only one of our client environments(on Prem), This basically happens when we are trying to interservice http client call. Some of the api calls breaks with this error intermittently
Details:
Stack: .net core 3.1
database : MySQL 8.0.25
ORM : EFCore
OS : Windows 10 pro
Deployment Model : Containers deployed via Docker Desktop
We are using typed Client Http Client factory for interservice httpclient calls. The only thing that I can see is on running Netstat that there are many(a lot actually) sockets that are in either CLOSE_WAIT and FIN_WAIT_2 state. Not sure how do we release this sockets.
Below is the stack trace
System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Polly.Retry.AsyncRetryEngine.ImplementationAsyncTResult\n at Polly.AsyncPolicy1.ExecuteAsync(Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)\n at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
697 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,164 questions
{count} votes