{
  "id": "communication/grpc-resource-exhausted",
  "signature": "grpc::RESOURCE_EXHAUSTED: gRPC call failed with status code 8",
  "signature_zh": "grpc::RESOURCE_EXHAUSTED: gRPC 调用失败，状态码 8",
  "regex": "RESOURCE_EXHAUSTED|status code 8|gRPC call failed with status code 8",
  "domain": "communication",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "gRPC server or client exhausts memory, file descriptors, or concurrent stream limits, often due to stream leakage or insufficient resource quotas in the transport layer.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 服务器或客户端耗尽了内存、文件描述符或并发流限制，通常是由于流泄漏或传输层资源配额不足导致。",
  "versions": [
    {
      "version": "gRPC 1.62",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-go v1.65",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-java 1.64",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "envoy 1.30",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase server memory and restart",
      "why_fails": "The issue is often not raw memory but stream limit exhaustion (e.g., MAX_CONCURRENT_STREAMS). More memory doesn't increase stream quotas.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set grpc.max_receive_message_size to a very high value (e.g., 500MB)",
      "why_fails": "This error is about connection-level resources, not message size. Changing message size doesn't address stream or FD exhaustion.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable keepalive pings in gRPC client",
      "why_fails": "Keepalive pings help detect dead connections and actually reduce resource leaks. Disabling them makes the problem worse.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the gRPC server's maximum concurrent streams: set `GRPC_ARG_MAX_CONCURRENT_STREAMS` to a higher value (e.g., 1000) and restart the server. Also monitor `grpc.server.streams` metric.",
      "success_rate": 0.85,
      "how": "Increase the gRPC server's maximum concurrent streams: set `GRPC_ARG_MAX_CONCURRENT_STREAMS` to a higher value (e.g., 1000) and restart the server. Also monitor `grpc.server.streams` metric.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add client-side connection pooling: reuse gRPC channels and limit the number of concurrent calls per channel using a semaphore or rate limiter.",
      "success_rate": 0.8,
      "how": "Add client-side connection pooling: reuse gRPC channels and limit the number of concurrent calls per channel using a semaphore or rate limiter.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure Envoy proxy to set `max_requests_per_connection` and `circuit_breakers` limits to prevent client-side resource exhaustion from overwhelming the gRPC server.",
      "success_rate": 0.88,
      "how": "Configure Envoy proxy to set `max_requests_per_connection` and `circuit_breakers` limits to prevent client-side resource exhaustion from overwhelming the gRPC server.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the gRPC server's maximum concurrent streams: set `GRPC_ARG_MAX_CONCURRENT_STREAMS` to a higher value (e.g., 1000) and restart the server. Also monitor `grpc.server.streams` metric.",
    "Add client-side connection pooling: reuse gRPC channels and limit the number of concurrent calls per channel using a semaphore or rate limiter.",
    "Configure Envoy proxy to set `max_requests_per_connection` and `circuit_breakers` limits to prevent client-side resource exhaustion from overwhelming the gRPC server."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.github.io/grpc/core/md_doc_statuscodes.html",
  "official_doc_section": null,
  "error_code": "8",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}