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

- **ID:** `grpc/grpc-max-pings-without-data`
- **Domain:** grpc
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

The server sent a GOAWAY frame because the client sent too many keepalive pings without any data flow.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC v1.38.0 | active | — | — |
| gRPC v1.49.0 | active | — | — |
| gRPC v1.58.0 | active | — | — |

## Workarounds

1. **Adjust client keepalive settings: reduce grpc.keepalive_time_ms to a higher value (e.g., 300000 ms) and increase grpc.keepalive_timeout_ms. Example in C++: channel_args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS, 300000);** (80% success)
   ```
   Adjust client keepalive settings: reduce grpc.keepalive_time_ms to a higher value (e.g., 300000 ms) and increase grpc.keepalive_timeout_ms. Example in C++: channel_args.SetInt(GRPC_ARG_KEEPALIVE_TIME_MS, 300000);
   ```
2. **On the server, set the maximum allowed pings without data using environment variable GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA (e.g., 0 to disable the limit) or via channel args.** (75% success)
   ```
   On the server, set the maximum allowed pings without data using environment variable GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA (e.g., 0 to disable the limit) or via channel args.
   ```
3. **Ensure client sends data frames periodically (e.g., by sending health check RPCs) to avoid triggering the ping-only limit.** (70% success)
   ```
   Ensure client sends data frames periodically (e.g., by sending health check RPCs) to avoid triggering the ping-only limit.
   ```

## Dead Ends

- **** — This may lead to undetected dead connections, causing other errors like 'stream removed'. (60% fail)
- **** — This can lead to resource exhaustion on the server if many clients ping aggressively. (50% fail)
- **** — The client will keep sending pings and get GOAWAY repeatedly, causing constant disconnections. (85% fail)
