{
  "id": "grpc/too-many-pings",
  "signature": "UNAVAILABLE: grpc: received goaway from server due to too_many_pings",
  "signature_zh": "UNAVAILABLE: grpc: 收到服务器GOAWAY，原因是ping过多",
  "regex": "UNAVAILABLE: grpc: received goaway from server due to too_many_pings",
  "domain": "grpc",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Client sends pings too frequently, exceeding server's max_pings_without_data or min_time_between_pings settings, causing server to send GOAWAY and close the connection.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端发送ping的频率过高，超过了服务器的max_pings_without_data或min_time_between_pings设置，导致服务器发送GOAWAY并关闭连接。",
  "versions": [
    {
      "version": "gRPC C++ 1.50+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gRPC Go 1.50+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Envoy 1.25+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Istio 1.18+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increasing keepalive time without adjusting ping interval",
      "why_fails": "The issue is not the keepalive time but the ping frequency; increasing keepalive time alone may not reduce ping rate if min_time_between_pings is violated.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling keepalive entirely",
      "why_fails": "Disabling keepalive can cause long-lived connections to be dropped by middleboxes (e.g., NAT, firewalls) that expect periodic traffic.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set client-side keepalive parameters: keepalive_time=30s, keepalive_timeout=10s, and min_time_between_pings=5s. In Go: grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 30 * time.Second, Timeout: 10 * time.Second, MinTimeBetweenPings: 5 * time.Second})",
      "success_rate": 0.9,
      "how": "Set client-side keepalive parameters: keepalive_time=30s, keepalive_timeout=10s, and min_time_between_pings=5s. In Go: grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 30 * time.Second, Timeout: 10 * time.Second, MinTimeBetweenPings: 5 * time.Second})",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure server-side max_pings_without_data to a higher value (e.g., 5) or increase min_time_between_pings (e.g., 10s). In C++ server builder: builder.AddChannelArgument(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS, 10000);",
      "success_rate": 0.85,
      "how": "Configure server-side max_pings_without_data to a higher value (e.g., 5) or increase min_time_between_pings (e.g., 10s). In C++ server builder: builder.AddChannelArgument(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS, 10000);",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Set client-side keepalive parameters: keepalive_time=30s, keepalive_timeout=10s, and min_time_between_pings=5s. In Go: grpc.WithKeepaliveParams(keepalive.ClientParameters{Time: 30 * time.Second, Timeout: 10 * time.Second, MinTimeBetweenPings: 5 * time.Second})",
    "Configure server-side max_pings_without_data to a higher value (e.g., 5) or increase min_time_between_pings (e.g., 10s). In C++ server builder: builder.AddChannelArgument(GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS, 10000);"
  ],
  "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.85,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}