-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Describe the bug
When I send several small message from signalr client to signalr hub,sometimes will raise a disconnect event. Message package is very small: 40B more or less , one per millisecond . The hub side do some time-consuming operations, 2 second in one message process operation。
When disconnect happened, the exception is null:2019-05-31 22:06:36,494 [6] DEBUG (null) CoordServer.Hubs.ServerHub >>> OnDisconnectedAsync Start, exception: (null)
or :2019-05-31 22:13:40,699 [23] ERROR (null) Microsoft.AspNetCore.SignalR.HubConnectionHandler >>> 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.HubConnectionHandler1.DispatchMessagesAsync(HubConnectionContext connection)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler1.RunHubAsync(HubConnectionContext connection).
From these links , I thought it maybe something about the size of ApplicationMaxBufferSize ,
but
Today SignalR needs to buffer the entire message before it calls your hub and it doesn't start consuming the buffer until it seems an entire message.
In my program, the message size is so small, why I still met this error?
Any helps? Thanks!
Additional context
Microsoft.AspNetCore.SignalR.Client 1.1.0
Microsoft.NETCore.App 2.2.0