-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskCanceledException exceptions occurring randomly #2403
Comments
The most likely reason for cancellations is that the client disconnected/canceled its request to the proxy. You can check whether that happened by looking at the (If the client talking to the proxy is an HttpClient, note that 1.8 min is roughly ~100 seconds, which happens to be the default HttpClient timeout) |
@MihaZupan Thanks for replying. I can add the Couple of questions:
|
The things that can currently trigger a cancellation are
You could double-check debug-level Kestrel logs, but I believe they should correspond to |
Closing as this is not actionable from our side without more info. Possibly related: #2195 |
Describe the bug
After deploying YARP, in our production environment we are seeing random exceptions as seen below. Most requests are successful, but a small portion (~1%) of them are having this issue.
To Reproduce
I am unable to reproduce the issue in the test environments. I suspected that the request was timing out because most of the exception were thrown at approx. 1.8mins, so I have set the Activity Timeout in proxy config and HttpClient timeout on client application to 10 minutes, but it didn't resolve the issue and proxy still randomly throws these exceptions.
Error message: The request was canceled before receiving a response.
or
Error message: The operation was canceled.
Further technical details
The service is running on a Windows Azure App Service using Yarp.ReverseProxy 2.0.1
The config is below:
The text was updated successfully, but these errors were encountered: