{
  "id": "grpc/grpc-deadline-too-short",
  "signature": "DEADLINE_EXCEEDED: grpc: deadline exceeded after 100ms while waiting for server to respond",
  "signature_zh": "截止时间超出：gRPC：等待服务器响应 100 毫秒后截止时间已超出",
  "regex": "deadline exceeded after \\d+ms while waiting for server to respond",
  "domain": "grpc",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The client's configured RPC deadline (timeout) is too short for the server's processing time, causing premature cancellation.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端配置的 RPC 截止时间（超时）相对于服务器的处理时间太短，导致过早取消。",
  "versions": [
    {
      "version": "gRPC v1.62.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.59.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.55.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python gRPC v1.60.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing server timeout setting (e.g., grpc-timeout header)",
      "why_fails": "The deadline is client-side; server ignores client deadline if it's not propagated.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling deadline entirely on the client",
      "why_fails": "gRPC requires a default deadline; setting to infinite can cause resource leaks.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the client-side deadline to a reasonable value, e.g., from 100ms to 5000ms, using `withDeadlineAfter(5000, TimeUnit.MILLISECONDS)` in Java or `timeout=5` in Python.",
      "success_rate": 0.92,
      "how": "Increase the client-side deadline to a reasonable value, e.g., from 100ms to 5000ms, using `withDeadlineAfter(5000, TimeUnit.MILLISECONDS)` in Java or `timeout=5` in Python.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Profile server-side latency and optimize slow endpoints (e.g., add caching, async processing) to reduce response time below the deadline.",
      "success_rate": 0.8,
      "how": "Profile server-side latency and optimize slow endpoints (e.g., add caching, async processing) to reduce response time below the deadline.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将客户端截止时间增加到合理值，例如从 100 毫秒增加到 5000 毫秒，Java 中使用 `withDeadlineAfter(5000, TimeUnit.MILLISECONDS)`，Python 中使用 `timeout=5`。",
    "分析服务器端延迟并优化慢速端点（例如添加缓存、异步处理），以将响应时间降低到截止时间以下。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/deadlines/",
  "official_doc_section": null,
  "error_code": "EDEADLINE",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-04-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}