{
  "id": "grpc/http2-ping-timeout",
  "signature": "UNAVAILABLE: grpc: HTTP2 ping timeout after 10s, closing connection",
  "signature_zh": "不可用：gRPC HTTP2 ping 超时（10 秒后），关闭连接",
  "regex": "UNAVAILABLE: grpc: HTTP2 ping timeout after \\d+s, closing connection",
  "domain": "grpc",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "gRPC client sent HTTP/2 pings but did not receive responses from the server within the timeout period, indicating network issues or server overload.",
  "root_cause_type": "generic",
  "root_cause_zh": "gRPC 客户端发送 HTTP/2 ping 但未在超时时间内收到服务器响应，表明网络问题或服务器过载。",
  "versions": [
    {
      "version": "gRPC v1.48.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.56.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC v1.63.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only extends the wait for ping responses; if the network is unreliable, pings still fail, and the connection closes after a longer delay.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Without pings, idle connections may be dropped by middleboxes (e.g., NATs, load balancers), leading to different errors like connection reset.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This pings only when streams are active; if the issue is network latency, pings still time out.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase both client and server keepalive timeout values: set `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` to 20000 (20 seconds) on the client, and ensure server `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` is also increased to match. Example in C++: `channel_args->SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 20000);`",
      "success_rate": 0.85,
      "how": "Increase both client and server keepalive timeout values: set `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` to 20000 (20 seconds) on the client, and ensure server `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` is also increased to match. Example in C++: `channel_args->SetInt(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 20000);`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Check network path for packet loss or high latency using tools like `mtr` or `ping`. If behind a load balancer, ensure it supports HTTP/2 ping responses and has an appropriate timeout.",
      "success_rate": 0.8,
      "how": "Check network path for packet loss or high latency using tools like `mtr` or `ping`. If behind a load balancer, ensure it supports HTTP/2 ping responses and has an appropriate timeout.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce the keepalive ping interval (`GRPC_ARG_KEEPALIVE_TIME_MS`) to 10000 (10 seconds) to detect failures faster and retry connections sooner.",
      "success_rate": 0.75,
      "how": "Reduce the keepalive ping interval (`GRPC_ARG_KEEPALIVE_TIME_MS`) to 10000 (10 seconds) to detect failures faster and retry connections sooner.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "增加客户端和服务器的 keepalive 超时时间：设置 `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` 为 20000 毫秒（20 秒），确保服务器端也同步增加。",
    "检查网络路径是否存在丢包或高延迟（使用 mtr 或 ping）。如果在负载均衡器后，确保支持 HTTP/2 ping 响应并设置适当的超时。",
    "减少 keepalive ping 间隔（`GRPC_ARG_KEEPALIVE_TIME_MS`）到 10000 毫秒（10 秒），更快检测故障并重新连接。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://grpc.io/docs/guides/keepalive/#keepalive-ping-timeout",
  "official_doc_section": null,
  "error_code": "GRPC_HTTP2_PING_TIMEOUT",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}