{
  "id": "communication/websocket-1009-message-too-big",
  "signature": "WebSocket frame exceeds maximum size: received 1048576 bytes, max allowed 65536 bytes (Error code 1009)",
  "signature_zh": "WebSocket 帧超过最大大小：接收 1048576 字节，最大允许 65536 字节（错误代码 1009）",
  "regex": "WebSocket\\s+frame\\s+exceeds\\s+maximum\\s+size.*\\d+\\s+bytes.*max\\s+allowed\\s+\\d+\\s+bytes",
  "domain": "communication",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "WebSocket server or client closes connection with code 1009 because the received message payload exceeds the configured maximum frame size, typically due to unsplit large payloads or misconfigured limits.",
  "root_cause_type": "generic",
  "root_cause_zh": "WebSocket 服务器或客户端以代码 1009 关闭连接，因为接收的消息负载超过配置的最大帧大小，通常是由于未分割的大负载或配置错误的限制。",
  "versions": [
    {
      "version": "RFC 6455",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Node.js ws library 8.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python websockets 12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Go gorilla/websocket 1.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the max frame size on the client only shifts the problem; the server may still enforce a smaller limit, causing asymmetric failures.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling fragmentation entirely (e.g., setting 'permessage-deflate' off) doesn't reduce payload size and may not be supported by all libraries.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Switching to a different WebSocket library without adjusting limits often results in the same default cap (e.g., 65536 bytes in many implementations).",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement message splitting on the sender: break large payloads (e.g., > 64KB) into multiple WebSocket messages with a sequence identifier, then reassemble on the receiver. This avoids exceeding the frame limit.",
      "success_rate": 0.9,
      "how": "Implement message splitting on the sender: break large payloads (e.g., > 64KB) into multiple WebSocket messages with a sequence identifier, then reassemble on the receiver. This avoids exceeding the frame limit.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the server's max frame size (e.g., in Python websockets: set 'max_size' parameter to None or a larger value like 10MB).",
      "success_rate": 0.85,
      "how": "Increase the server's max frame size (e.g., in Python websockets: set 'max_size' parameter to None or a larger value like 10MB).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use compression (e.g., permessage-deflate extension) to reduce payload size below the limit, if both client and server support it.",
      "success_rate": 0.8,
      "how": "Use compression (e.g., permessage-deflate extension) to reduce payload size below the limit, if both client and server support it.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Implement message splitting on the sender: break large payloads (e.g., > 64KB) into multiple WebSocket messages with a sequence identifier, then reassemble on the receiver. This avoids exceeding the frame limit.",
    "Increase the server's max frame size (e.g., in Python websockets: set 'max_size' parameter to None or a larger value like 10MB).",
    "Use compression (e.g., permessage-deflate extension) to reduce payload size below the limit, if both client and server support it."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/statusCode",
  "official_doc_section": null,
  "error_code": "1009",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.84,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}