{
  "id": "go/grpc-connection-closing-transport",
  "signature": "rpc error: code = Unavailable desc = error reading from server: EOF",
  "signature_zh": "rpc 错误：code = Unavailable desc = 从服务器读取错误：EOF",
  "regex": "rpc\\ error:\\ code\\ =\\ Unavailable\\ desc\\ =\\ error\\ reading\\ from\\ server:\\ EOF",
  "domain": "go",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The server closed the HTTP/2 connection mid-stream. Typically the server process exited, was restarted, or a proxy/load balancer dropped the connection.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器在流传输中途关闭了 HTTP/2 连接。通常是服务器进程退出、重启，或代理/负载均衡器断开了连接。",
  "versions": [
    {
      "version": "grpc-go 1.58+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error originates at the transport layer from the server side closing the connection; the client handler is not at fault.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling keepalive does not prevent the server from closing; it actually makes stale connections harder to detect.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Enable client keepalive to detect dead connections quickly:\nconn, err := grpc.NewClient(addr,\n    grpc.WithKeepaliveParams(keepalive.ClientParameters{\n        Time: 10 * time.Second, Timeout: 3 * time.Second, PermitWithoutStream: true,\n    }),\n)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.82,
      "how": "Add a retry policy for UNAVAILABLE and inspect server logs for crashes:\n// configure retryableStatusCodes: [\"UNAVAILABLE\"] in the service config, then check server OOM/panic logs.",
      "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-07-21",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}