I have a C# application that communicates with an API. I'm encountering a timeout issue when making requests to the API. The specific error message I'm receiving is:
---> Flurl.Http.FlurlHttpTimeoutException: Call timed out: GET https://---.--.com:7000/api/Establecimiento/ExisteIdentificadorUnico/00074
---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
---> System.IO.IOException: Unable to read data from the transport connection: La operación de E/S se anuló por una salida de subproceso o por una solicitud de aplicación..
---> System.Net.Sockets.SocketException (995): La operación de E/S se anuló por una salida de subproceso o por una solicitud de aplicación.
The strange thing is that after I restart the application, the timeout issue disappears and the communication with the API works fine. However, it eventually resurfaces after some time.
Here are some additional details:
- I'm using .NET Core for the application
- I'm using Flurl and Flurl.Http for api calls
- The API is built using .NET Core and C# as well.
- Client Timeout is set in 12 minutes
- I have checked the network connectivity, and it seems to be stable.
- I have reviewed my code for any potential issues but couldn't identify anything that would cause the timeout problem.
I suspect that there might be some underlying cause or configuration that I'm missing. Any guidance or suggestions on how to troubleshoot and mitigate this issue would be greatly appreciated.