{
  "id": "go/grpc-deadline-exceeded-server",
  "signature": "rpc error: code = DeadlineExceeded desc = context deadline exceeded",
  "signature_zh": "rpc 错误：code = DeadlineExceeded，desc = 上下文截止时间已超过",
  "regex": "rpc\\ error:\\ code\\ =\\ DeadlineExceeded\\ desc\\ =\\ context\\ deadline\\ exceeded",
  "domain": "go",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The client-side context deadline elapsed before the server responded; the server may still be processing, or the network is slow.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端上下文截止时间在服务端响应前已耗尽；服务端可能仍在处理，或网络较慢。",
  "versions": [
    {
      "version": "google.golang.org/grpc 1.40+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Removes the safety net; hung servers block callers forever and exhaust connection pools.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Without jitter/backoff, retries amplify load on an already-slow server, causing cascading timeouts.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Propagate deadlines from the caller and add per-RPC timeout at the client:\nctx, cancel := context.WithTimeout(ctx, 2*time.Second)\ndefer cancel()\nresp, err := client.Get(ctx, req)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Instrument server-side handler duration (otelgrpc / prometheus) to distinguish slow processing from network latency, then tune deadline accordingly.",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-02-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}