# UNAVAILABLE: grpc: received goaway from server due to too_many_pings

- **ID:** `grpc/too-many-pings`
- **Domain:** grpc
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC C++ 1.50+ | active | — | — |
| gRPC Go 1.50+ | active | — | — |
| Envoy 1.25+ | active | — | — |
| Istio 1.18+ | active | — | — |

## Workarounds

1. **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})** (90% success)
   ```
   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})
   ```
2. **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);** (85% success)
   ```
   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);
   ```

## Dead Ends

- **Increasing keepalive time without adjusting ping interval** — 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. (40% fail)
- **Disabling keepalive entirely** — Disabling keepalive can cause long-lived connections to be dropped by middleboxes (e.g., NAT, firewalls) that expect periodic traffic. (30% fail)
