# INTERNAL: grpc: received HTTP/2 frame with size 16777216, which exceeds the configured maximum 16384

- **ID:** `grpc/http2-max-frame-size-exceeded`
- **Domain:** grpc
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The gRPC server or client configured a smaller HTTP/2 max frame size than the peer is sending, causing a protocol violation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| gRPC C++ 1.62.0 | active | — | — |
| gRPC Go 1.64.0 | active | — | — |
| Envoy 1.30.0 | active | — | — |

## Workarounds

1. **Set `GRPC_ARG_HTTP2_MAX_FRAME_SIZE` to a larger value (e.g., 65536) on both client and server: `export GRPC_ARG_HTTP2_MAX_FRAME_SIZE=65536`** (85% success)
   ```
   Set `GRPC_ARG_HTTP2_MAX_FRAME_SIZE` to a larger value (e.g., 65536) on both client and server: `export GRPC_ARG_HTTP2_MAX_FRAME_SIZE=65536`
   ```
2. **In gRPC-Web or Envoy, configure `max_frame_size` in the HTTP connection manager: `http_filters: [name: envoy.filters.http.grpc_web]` then set `max_request_size_kb: 65536`** (80% success)
   ```
   In gRPC-Web or Envoy, configure `max_frame_size` in the HTTP connection manager: `http_filters: [name: envoy.filters.http.grpc_web]` then set `max_request_size_kb: 65536`
   ```

## Dead Ends

- **Increase max frame size on client only to a very high value like 64MB** — The server may have its own limit; mismatch persists and can cause memory issues. (60% fail)
- **Disable HTTP/2 frame size checks entirely via environment variable** — Not a standard gRPC option; may lead to silent data corruption. (80% fail)
- **Restart both services without any config change hoping it's transient** — The misconfiguration persists across restarts. (90% fail)
