{
  "id": "go/grpc-resource-exhausted-memory",
  "signature": "rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4294967295 vs. 4194304)",
  "signature_zh": "rpc错误：代码=资源耗尽 描述=grpc：接收的消息大小超过最大值（4294967295 vs. 4194304）",
  "regex": "rpc\\ error:\\ code\\ =\\ ResourceExhausted\\ desc\\ =\\ grpc:\\ received\\ message\\ larger\\ than\\ max\\ \\(4294967295\\ vs\\.\\ 4194304\\)",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The gRPC message size exceeds the configured maximum, often due to large payloads or streaming data.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC消息大小超过配置的最大值，通常是由于有效载荷过大或流式数据。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Ignore the limit and send the same large message again.",
      "why_fails": "The server will reject it again because the limit is enforced.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce the message size by splitting manually without adjusting server config.",
      "why_fails": "Manual splitting may break protocol semantics and increase complexity.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the maximum message size on both client and server.",
      "success_rate": 0.9,
      "how": "// Server side\ns := grpc.NewServer(grpc.MaxRecvMsgSize(10*1024*1024), grpc.MaxSendMsgSize(10*1024*1024))\n// Client side\nconn, err := grpc.Dial(\"localhost:8080\", grpc.WithInsecure(), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(10*1024*1024), grpc.MaxCallSendMsgSize(10*1024*1024)))",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement streaming to handle large data in chunks.",
      "success_rate": 0.85,
      "how": "Use server streaming RPC to send data in multiple messages, e.g., service MyService { rpc Upload(stream Chunk) returns (UploadStatus); }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}