-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
acceptedThis issue has completed "acceptance" testing (including accessibility)This issue has completed "acceptance" testing (including accessibility)area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and serversblockedThe work on this issue is blocked due to some dependencyThe work on this issue is blocked due to some dependency
Milestone
Description
Right now, if you send a single message that serializes to larger than 32KB, you get:
fail: Microsoft.AspNetCore.SignalR.HubConnectionHandler[2]
Error when processing requests.
System.InvalidOperationException: Advancing examined to the end would cause pipe to deadlock because FlushAsync is waiting.
at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_BackpressureDeadlock()
at System.IO.Pipelines.Pipe.AdvanceReader(BufferSegment consumedSegment, Int32 consumedIndex, BufferSegment examinedSegment, Int32 examinedIndex)
at System.IO.Pipelines.Pipe.AdvanceReader(SequencePosition& consumed, SequencePosition& examined)
at System.IO.Pipelines.Pipe.DefaultPipeReader.AdvanceTo(SequencePosition consumed, SequencePosition examined)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.RunHubAsync(HubConnectionContext connection)
fail: Microsoft.AspNetCore.SignalR.HubConnectionHandler[2]
Error when processing requests.
System.InvalidOperationException: Advancing examined to the end would cause pipe to deadlock because FlushAsync is waiting.
at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_BackpressureDeadlock()
at System.IO.Pipelines.Pipe.AdvanceReader(BufferSegment consumedSegment, Int32 consumedIndex, BufferSegment examinedSegment, Int32 examinedIndex)
at System.IO.Pipelines.Pipe.AdvanceReader(SequencePosition& consumed, SequencePosition& examined)
at System.IO.Pipelines.Pipe.DefaultPipeReader.AdvanceTo(SequencePosition consumed, SequencePosition examined)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.DispatchMessagesAsync(HubConnectionContext connection)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.RunHubAsync(HubConnectionContext connection)
These errors are unpleasant. They occur because we are trying to read a single message that is larger than the backpressure size. We should provide a better error message in this case (heck, even if it takes just catching the exception). Something like "Message exceeded the maximum buffer size of {TransportMaxBufferSize} bytes"
It may be difficult to do this though, so we'll need to design this a bit (and may decide it's not feasible in the process).
Metadata
Metadata
Assignees
Labels
acceptedThis issue has completed "acceptance" testing (including accessibility)This issue has completed "acceptance" testing (including accessibility)area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and serversblockedThe work on this issue is blocked due to some dependencyThe work on this issue is blocked due to some dependency