Skip to main content
1009

Message Too Big

Sent by: BothDo not retry

1009 Message Too Big is sent when an endpoint receives a message that exceeds the maximum message size it is configured to accept. WebSocket frames can theoretically be up to 2^64 bytes, but implementations enforce limits. Nginx's default limit is 1MB. The sender should reduce the message size or implement message fragmentation.

Description

1009 indicates the receiver's message size limit was exceeded. Nginx's proxy_read_timeout and client_max_body_size affect WebSocket message limits. Node.js's ws library has a maxPayload option (default 100MB). Application-level message size limits should be enforced by the application before hitting the WebSocket layer. Large data transfers should be chunked or sent over a separate HTTP endpoint instead of WebSocket.

Common Causes

  • Message exceeds server's maxPayload limit
  • Image or binary data sent as a single frame
  • Nginx proxy_max_temp_file_size or client_max_body_size hit

Code

1009

RFC

RFC 6455

Sent By

Both

Retry

No