Skip to content

Socket Connection closed Prematurely  #57919

@santhoshrajr

Description

@santhoshrajr

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am facing issue where some of the websocket connections get removed because of Socket Exception closed Preamturely though the client has not closed the connection.
My workspace setup uses Traefik as External Load balancer to Kubernetes.
I enabled verbose logging on SignalR server and I see that the client pings are not recorded before the exception is thrown.
Please guide me how to resolve the issue. Attaching below logs and exception :

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake. at System.Net.WebSockets.ManagedWebSocket.ThrowEOFUnexpected() at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TResult](Memory1 payloadBuffer, CancellationToken cancellationToken) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsServerTransport.StartReceiving(WebSocket socket)

.NET Version

8

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions