{
  "id": "api/grpc-deadline-exceeded-streaming",
  "signature": "gRPC error: DEADLINE_EXCEEDED: deadline exceeded waiting for stream response",
  "signature_zh": "gRPC 错误：DEADLINE_EXCEEDED：等待流响应超时",
  "regex": "DEADLINE_EXCEEDED.*deadline exceeded|deadline exceeded waiting for stream response",
  "domain": "api",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Client-set deadline (timeout) expired before the server finished sending all stream messages, often due to slow processing or network latency on long-lived streams.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端设置的截止时间（超时）在服务器完成发送所有流消息之前到期，通常由于长时间流上的慢处理或网络延迟。",
  "versions": [
    {
      "version": "gRPC 1.58",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-Go 1.60",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-Java 1.61",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Envoy 1.28",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Unbounded timeouts mask underlying performance issues and may cause resource leaks; the correct fix is per-stream or per-RPC tuning, not a global increase.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This removes timeout protection, leading to hung connections and resource exhaustion; gRPC requires deadlines for reliability.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set a per-RPC deadline that matches expected stream duration. For server-streaming RPCs, use a longer deadline (e.g., 60s) and implement keepalive pings to detect dead connections.",
      "success_rate": 0.85,
      "how": "Set a per-RPC deadline that matches expected stream duration. For server-streaming RPCs, use a longer deadline (e.g., 60s) and implement keepalive pings to detect dead connections.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement server-side streaming with backpressure: use flow control to prevent the server from sending faster than the client can consume, reducing the risk of deadline exceeded due to buffering.",
      "success_rate": 0.8,
      "how": "Implement server-side streaming with backpressure: use flow control to prevent the server from sending faster than the client can consume, reducing the risk of deadline exceeded due to buffering.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "为每个 RPC 设置与预期流持续时间匹配的截止时间。对于服务器流式 RPC，使用较长的截止时间（例如 60 秒）并实现 keepalive ping 以检测死连接。",
    "在服务器端实现带有背压的流式传输：使用流量控制防止服务器发送速度超过客户端消费速度，减少因缓冲导致截止时间超时的风险。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/deadlines/",
  "official_doc_section": null,
  "error_code": "DEADLINE_EXCEEDED",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2024-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}