grpc
protocol_error
ai_generated
true
INTERNAL: grpc: received HTTP/2 frame with size 16777216, which exceeds the configured maximum 16384
ID: grpc/http2-max-frame-size-exceeded
85%Fix Rate
88%Confidence
1Evidence
2024-03-15First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| gRPC C++ 1.62.0 | active | — | — | — |
| gRPC Go 1.64.0 | active | — | — | — |
| Envoy 1.30.0 | active | — | — | — |
Root Cause
The gRPC server or client configured a smaller HTTP/2 max frame size than the peer is sending, causing a protocol violation.
generic中文
gRPC 服务器或客户端配置的 HTTP/2 最大帧大小小于对端发送的大小,导致协议违规。
Official Documentation
https://grpc.io/docs/guides/performance/#http2-settingsWorkarounds
-
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`
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`
-
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`
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`
中文步骤
将客户端和服务端的 `GRPC_ARG_HTTP2_MAX_FRAME_SIZE` 设置为更大的值(如 65536):`export GRPC_ARG_HTTP2_MAX_FRAME_SIZE=65536`
在 gRPC-Web 或 Envoy 的 HTTP 连接管理器中配置 `max_frame_size`:`http_filters: [name: envoy.filters.http.grpc_web]` 然后设置 `max_request_size_kb: 65536`
Dead Ends
Common approaches that don't work:
-
Increase max frame size on client only to a very high value like 64MB
60% fail
The server may have its own limit; mismatch persists and can cause memory issues.
-
Disable HTTP/2 frame size checks entirely via environment variable
80% fail
Not a standard gRPC option; may lead to silent data corruption.
-
Restart both services without any config change hoping it's transient
90% fail
The misconfiguration persists across restarts.