Skip to content

Set grpcserver.WithKeepaliveEnforcement to 10s to match the client keepalive interval#8799

Merged
GiedriusS merged 2 commits into
thanos-io:mainfrom
jdgeisler:fix-grpc-keepalive-enforcement
May 5, 2026
Merged

Set grpcserver.WithKeepaliveEnforcement to 10s to match the client keepalive interval#8799
GiedriusS merged 2 commits into
thanos-io:mainfrom
jdgeisler:fix-grpc-keepalive-enforcement

Conversation

@jdgeisler

@jdgeisler jdgeisler commented Apr 30, 2026

Copy link
Copy Markdown
Contributor
  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

When using the distributed query engine, we noticed an issue where the queriers would return the error ENHANCE_YOUR_CALM / too_many_pings.

The Thanos grpc client sends keepalive pings every 10s, but without an explicit KeepaliveEnforcementPolicy on
the server, the go grpc library default min time of 5 minutes is used. This causes the server to reject the second ping with ENHANCE_YOUR_CALM / too_many_pings, dropping the connection.

Setting a KeepaliveEnforcementPolicy with MinTime: 10s on all gRPC servers to match the client keep alive interval resolves this issue.

Verification

Before configuring the KeepaliveEnforcementPolicy to 10s.

Screenshot 2026-04-30 at 2 13 17 PM

After configuring the KeepaliveEnforcementPolicy to 10s. The error no longer occurs.

Screenshot 2026-04-30 at 2 10 22 PM

@jdgeisler
jdgeisler force-pushed the fix-grpc-keepalive-enforcement branch from fb6cdbc to 1166621 Compare April 30, 2026 21:30
@jdgeisler
jdgeisler force-pushed the fix-grpc-keepalive-enforcement branch from 1166621 to e07785d Compare May 4, 2026 15:48
…the client keepalive interval

Signed-off-by: James Geisler <[email protected]>
@jdgeisler
jdgeisler force-pushed the fix-grpc-keepalive-enforcement branch from e07785d to 5940c31 Compare May 4, 2026 16:10
@pull-request-size pull-request-size Bot added size/XS and removed size/M labels May 4, 2026
@jdgeisler jdgeisler changed the title make grpcserver.WithKeepaliveEnforcement configurable Set grpcserver.WithKeepaliveEnforcement to 10s to match the client keepalive interval May 4, 2026
@GiedriusS
GiedriusS enabled auto-merge May 5, 2026 13:01
@GiedriusS
GiedriusS merged commit 88ba209 into thanos-io:main May 5, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants