{
  "id": "grpc/grpc-message-too-large-client",
  "signature": "RESOURCE_EXHAUSTED: grpc: received message larger than max (5242880 vs. 4194304)",
  "signature_zh": "RESOURCE_EXHAUSTED: grpc: 接收的消息超过最大限制 (5242880 vs. 4194304)",
  "regex": "RESOURCE_EXHAUSTED: grpc: received message larger than max \\(\\d+ vs\\. \\d+\\)",
  "domain": "grpc",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Client received a gRPC response message that exceeds the configured max receive message size.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端接收到的 gRPC 响应消息超过了配置的最大接收消息大小。",
  "versions": [
    {
      "version": "gRPC v1.48.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.56.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.62.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error occurs on the client side; server-side changes alone don't fix client-side limits.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Compression may reduce size but doesn't guarantee it stays under the limit; also adds overhead.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The same large message will be received again unless the client limit is increased.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the client's max receive message size using grpc.max_receive_message_length option. Example in Python: channel = grpc.insecure_channel('localhost:50051', options=[('grpc.max_receive_message_length', 10 * 1024 * 1024)])",
      "success_rate": 0.9,
      "how": "Increase the client's max receive message size using grpc.max_receive_message_length option. Example in Python: channel = grpc.insecure_channel('localhost:50051', options=[('grpc.max_receive_message_length', 10 * 1024 * 1024)])",
      "condition": "",
      "sources": []
    },
    {
      "action": "Set the environment variable GRPC_MAX_RECEIVE_MESSAGE_LENGTH to a larger value (e.g., 10485760 for 10 MB) before starting the client process.",
      "success_rate": 0.85,
      "how": "Set the environment variable GRPC_MAX_RECEIVE_MESSAGE_LENGTH to a larger value (e.g., 10485760 for 10 MB) before starting the client process.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Refactor the RPC to use streaming responses or pagination to avoid sending large messages in a single response.",
      "success_rate": 0.75,
      "how": "Refactor the RPC to use streaming responses or pagination to avoid sending large messages in a single response.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the client's max receive message size using grpc.max_receive_message_length option. Example in Python: channel = grpc.insecure_channel('localhost:50051', options=[('grpc.max_receive_message_length', 10 * 1024 * 1024)])",
    "Set the environment variable GRPC_MAX_RECEIVE_MESSAGE_LENGTH to a larger value (e.g., 10485760 for 10 MB) before starting the client process.",
    "Refactor the RPC to use streaming responses or pagination to avoid sending large messages in a single response."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/performance/#message-size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-05-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}