1011
Internal Server Error
Sent by: ServerRetryable
1011 Internal Server Error is sent by a server when an unexpected condition prevented it from processing a client request. It is the WebSocket equivalent of HTTP 500. The server encountered an error that caused it to close the connection. The client may retry after a delay.
Description
1011 is used when the server encounters an unhandled exception or unexpected error while processing a WebSocket message. It is distinct from 1000 (clean closure) and 1001 (planned shutdown). Unlike application-level errors that can be sent as regular messages, an error severe enough to require connection closure should use 1011. Clients receiving 1011 should implement exponential backoff before reconnecting.
Common Causes
- –Unhandled exception in WebSocket message handler
- –Database error during message processing
- –Out of memory condition
- –External service call failed
Code
1011
RFC
RFC 6455
Sent By
Server
Retry
Yes