{
  "id": "grpc/deadline-exceeded-client-idle-timeout",
  "signature": "DEADLINE_EXCEEDED: client idle timeout exceeded",
  "signature_zh": "DEADLINE_EXCEEDED: 客户端空闲超时已超出",
  "regex": "DEADLINE_EXCEEDED: client idle timeout exceeded",
  "domain": "grpc",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "gRPC client channel idle timeout (default 30 minutes) expired before any RPC was made, causing the channel to close and pending calls to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC客户端通道空闲超时（默认30分钟）在发起任何RPC之前到期，导致通道关闭，挂起的调用失败。",
  "versions": [
    {
      "version": "gRPC v1.60.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.65.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC-Java v1.62.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reducing the RPC deadline (e.g., from 10s to 5s) doesn't fix the idle timeout; the channel still closes after the idle period.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing client keepalive time (e.g., 'grpc.keepalive_time=10s') without enabling keepalive ping prevents timeout because keepalive is disabled by default for idle channels.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Recreating the channel on each RPC avoids idle timeout but introduces high latency and resource overhead, potentially causing other errors like 'RESOURCE_EXHAUSTED'.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Disable idle timeout: set channel argument 'grpc.idle_timeout=0' (Python: 'grpc.insecure_channel(target, options=[(\"grpc.idle_timeout\", 0)])') to keep the channel open indefinitely.",
      "success_rate": 0.95,
      "how": "Disable idle timeout: set channel argument 'grpc.idle_timeout=0' (Python: 'grpc.insecure_channel(target, options=[(\"grpc.idle_timeout\", 0)])') to keep the channel open indefinitely.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Enable keepalive pings to prevent idle timeout: configure 'grpc.keepalive_time_ms=10000', 'grpc.keepalive_timeout_ms=5000', and 'grpc.keepalive_permit_without_calls=1' to maintain channel activity.",
      "success_rate": 0.85,
      "how": "Enable keepalive pings to prevent idle timeout: configure 'grpc.keepalive_time_ms=10000', 'grpc.keepalive_timeout_ms=5000', and 'grpc.keepalive_permit_without_calls=1' to maintain channel activity.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Schedule a periodic health check RPC (e.g., every 20 minutes) to reset the idle timer; use a lightweight 'HealthCheck' service call to keep the channel alive.",
      "success_rate": 0.8,
      "how": "Schedule a periodic health check RPC (e.g., every 20 minutes) to reset the idle timer; use a lightweight 'HealthCheck' service call to keep the channel alive.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "禁用空闲超时：设置通道参数'grpc.idle_timeout=0'（Python: 'grpc.insecure_channel(target, options=[(\"grpc.idle_timeout\", 0)])'）以保持通道无限期打开。",
    "启用保活ping以防止空闲超时：配置'grpc.keepalive_time_ms=10000'、'grpc.keepalive_timeout_ms=5000'和'grpc.keepalive_permit_without_calls=1'以维持通道活动。",
    "安排定期健康检查RPC（如每20分钟一次）以重置空闲计时器；使用轻量级的'HealthCheck'服务调用保持通道活跃。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/keepalive/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-03-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}