Skip to content

fix(anycable): prevent gRPC keepalive too_many_pings GoAway - #3271

Merged
jmthomas merged 2 commits into
mainfrom
fix/3240-anycable-grpc-keepalive
Apr 24, 2026
Merged

fix(anycable): prevent gRPC keepalive too_many_pings GoAway#3271
jmthomas merged 2 commits into
mainfrom
fix/3240-anycable-grpc-keepalive

Conversation

@jmthomas

Copy link
Copy Markdown
Member

AnyCable's default server min_recv_ping_interval_without_data_ms (10_000ms) matches anycable-go's hardcoded 10s client keepalive exactly. Jitter causes pings to arrive under the threshold, accumulating strikes and emitting GoAway ENHANCE_YOUR_CALM that tears down active RPCs (closes #3240). Halve the server minimum to 5_000ms for jitter tolerance.

AnyCable's default server min_recv_ping_interval_without_data_ms
(10_000ms) matches anycable-go's hardcoded 10s client keepalive
exactly. Jitter causes pings to arrive under the threshold,
accumulating strikes and emitting GoAway ENHANCE_YOUR_CALM that
tears down active RPCs (closes #3240). Halve the server minimum
to 5_000ms for jitter tolerance.
@jmthomas
jmthomas requested a review from ryanmelt April 24, 2026 18:00
@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.35%. Comparing base (ff2ed73) to head (918fe35).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3271      +/-   ##
==========================================
- Coverage   78.38%   78.35%   -0.03%     
==========================================
  Files         676      677       +1     
  Lines       55634    55636       +2     
  Branches      728      728              
==========================================
- Hits        43606    43592      -14     
- Misses      11950    11966      +16     
  Partials       78       78              
Flag Coverage Δ
python 79.51% <ø> (-0.01%) ⬇️
ruby-api 83.30% <100.00%> (-0.34%) ⬇️
ruby-backend 81.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

config.rpc_server_args = {
"grpc.keepalive_permit_without_calls" => 1,
"grpc.http2.min_recv_ping_interval_without_data_ms" => 5_000,
"grpc.http2.min_ping_interval_without_data_ms" => 5_000,

@jmthomas jmthomas Apr 24, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting both of these to 60_000 allowed me to reproduce the issue. At least I could see the ENHANCE_YOUR_CALM message.

@jmthomas

Copy link
Copy Markdown
Member Author

Also made upstream fix in anycable-rb: anycable/anycable-rb#6

@sonarqubecloud

Copy link
Copy Markdown

@jmthomas
jmthomas merged commit 974ccca into main Apr 24, 2026
35 of 36 checks passed
@jmthomas
jmthomas deleted the fix/3240-anycable-grpc-keepalive branch April 24, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

anycable-go keepalive ping interval conflicts with gRPC minimum

2 participants