Skip to main content
1006

Abnormal Closure

Sent by: ReservedRetryable

1006 Abnormal Closure is a reserved code used by WebSocket libraries when the connection was closed abnormally – without a close handshake and without a specific error code. Like 1005, it is never sent in a close frame. 1006 indicates an unexpected connection drop: network failure, server crash, or forced TCP reset.

Description

1006 is the most common WebSocket error developers encounter. It means the connection ended unexpectedly without the normal close handshake. Causes range from a server crash to a corporate firewall closing idle WebSocket connections to a network interface going down. 1006 is a strong signal to implement reconnection logic with exponential backoff and jitter. Unlike 1005 (which specifically means no status was received), 1006 covers all abnormal termination scenarios.

Common Causes

  • Server process crashed or OOM killed
  • Network interface failure
  • Firewall or proxy killed idle connection
  • Heroku/cloud platform 55-second idle timeout
  • DNS resolution failure on reconnect
  • Load balancer forcibly closing connection

Code

1006

RFC

RFC 6455

Sent By

Reserved

Retry

Yes