{
  "id": "grpc/compression-message-size-mismatch",
  "signature": "INTERNAL: grpc: decompressed message size 1048576 exceeds max 524288",
  "signature_zh": "INTERNAL: grpc: 解压后的消息大小 1048576 超过最大限制 524288",
  "regex": "INTERNAL: grpc: decompressed message size .* exceeds max",
  "domain": "grpc",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "After decompression, the message size exceeds the configured max receive message size, causing an internal error even though the compressed size was within limits.",
  "root_cause_type": "generic",
  "root_cause_zh": "解压缩后，消息大小超过了配置的最大接收消息大小，即使压缩后的大小在限制内，也会导致内部错误。",
  "versions": [
    {
      "version": "gRPC v1.58.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.61.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.64.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing the client's max send message size to match the decompressed size.",
      "why_fails": "The error is on the receiving side; max send size controls outgoing messages, not incoming decompressed messages.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling compression on the server side to avoid decompression entirely.",
      "why_fails": "This may break clients that rely on compression for performance; it also doesn't address the root cause of the size limit.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting the environment variable GRPC_MAX_RECEIVE_MESSAGE_LENGTH to a value lower than the compressed size.",
      "why_fails": "This would reject the message before decompression, worsening the issue.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the client's max receive message size to accommodate the decompressed payload: `channel = grpc.insecure_channel(target, options=[('grpc.max_receive_message_length', 2 * 1024 * 1024)])`",
      "success_rate": 0.95,
      "how": "Increase the client's max receive message size to accommodate the decompressed payload: `channel = grpc.insecure_channel(target, options=[('grpc.max_receive_message_length', 2 * 1024 * 1024)])`",
      "condition": "",
      "sources": []
    },
    {
      "action": "On the server side, reduce the uncompressed message size by splitting large responses or using streaming instead of unary calls.",
      "success_rate": 0.85,
      "how": "On the server side, reduce the uncompressed message size by splitting large responses or using streaming instead of unary calls.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using gRPC-Web, ensure the proxy's max buffer size is also increased (e.g., Envoy's `max_request_body_size`).",
      "success_rate": 0.8,
      "how": "If using gRPC-Web, ensure the proxy's max buffer size is also increased (e.g., Envoy's `max_request_body_size`).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the client's max receive message size to accommodate the decompressed payload: `channel = grpc.insecure_channel(target, options=[('grpc.max_receive_message_length', 2 * 1024 * 1024)])`",
    "On the server side, reduce the uncompressed message size by splitting large responses or using streaming instead of unary calls.",
    "If using gRPC-Web, ensure the proxy's max buffer size is also increased (e.g., Envoy's `max_request_body_size`)."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/compression/#decompression",
  "official_doc_section": null,
  "error_code": "EDECOMPRESS",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-05-08",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}