Repository navigation
Fix keepalive gRPC channel options - #39
Merged
johnbywater merged 2 commits intoOct 16, 2026
Merged
Conversation
Collaborator
|
Thanks for this @maarioos123! Looks good to me. Looks like some older image sources have been taken down after completing the move to Docker Hub. I will review the available images and adjust accordingly. |
KeepAliveInterval was passed as "grpc.keepalive_ms", which gRPC ignores, so no keepalive pings were sent. Pass it as "grpc.keepalive_time_ms". KeepAliveTimeout now also sets "grpc.http2.ping_timeout_ms". With grpcio 1.84, an unanswered ping closes the connection only after that time (default 60s), not after "grpc.keepalive_timeout_ms". Fixes pyeventsourcing#38 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
johnbywater
force-pushed
the
fix-keepalive-grpc-options
branch
from
October 16, 2026 15:38
92af4bf to
29284d0
Compare
Collaborator
|
Thanks again @maarioos123. These changes are in https://pypi.org/project/kurrentdbclient/1.3.4/ which has been tested with all the latest Docker images, updated versions of the dependencies, and Python 3.15. Let us know if you have any further issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38.
What this changes
KeepAliveIntervalsetsgrpc.keepalive_time_ms. It used to setgrpc.keepalive_ms, which gRPC ignores, so no keepalive pings were sent.KeepAliveTimeoutalso setsgrpc.http2.ping_timeout_ms. Withgrpcio1.84, an unanswered ping closes the connection only after this time (default 60 s), not aftergrpc.keepalive_timeout_ms.TestGrpcOptionsand the options table in the README use the new names.The issue also suggested
grpc.http2.max_pings_without_data=0. It was not needed: the first unanswered ping is enough to close the connection, so I left it out.How I tested it
tests/test_client.py -k "TestGrpcOptions or keep_alive": 3 passed.docker pause, 40 reads in threads, withKeepAliveInterval=5000&KeepAliveTimeout=5000:ServiceUnavailableError: Stream removed (ping timeout). Afterdocker unpause, the same client read normally.too_many_pingsorGOAWAY.I did not run the full test suite, because it needs the cluster from
docker-compose.yml.🤖 Generated with Claude Code