Skip to content

Error with too much load in long requests #2423

Answered by MihaZupan
ValMati asked this question in Q&A
Discussion options

You must be logged in to vote

For YARP logs, you could expect to see something like

warn: Yarp.ReverseProxy.Forwarder.HttpForwarder[48]
      RequestCanceled: The request was canceled before receiving a response.
      System.Threading.Tasks.TaskCanceledException: The operation was canceled.
         at System.Net.Http.Http2Connection.Http2Stream.<>c.<WaitForDataAsync>b__80_0(Object s, CancellationToken cancellationToken)
         // ...

where RequestCanceled is the ForwarderError enum.

If you were doing it from code, you can see the ForwarderError in a middleware like so:

await next();

if (context.Features.Get<IForwarderErrorFeature>() is { } errorFeature)
{
    ForwarderError error = errorFeature.Error;
    Exception

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@MihaZupan
Comment options

Answer selected by karelz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants