You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KeepAliveInterval sets an unknown gRPC option, so keepalive pings are never sent #38
BaseKurrentDBClient.__init__ maps KeepAliveInterval to the channel option grpc.keepalive_ms. gRPC does not know this option and ignores it. The gRPC option is grpc.keepalive_time_ms. Because of this, KeepAliveInterval and KeepAliveTimeout in the connection string have no effect, and the client sends no keepalive pings.
Steps to reproduce
Connect with ?KeepAliveInterval=5000&KeepAliveTimeout=5000.
Freeze KurrentDB with docker pause and start a read.
Run with GRPC_TRACE=http_keepalive GRPC_VERBOSITY=DEBUG.
Result: no keepalive pings are sent, and the read waits until KurrentDB responds again.
A second detail
With grpc.keepalive_time_ms set, the pings are sent. But with grpcio 1.84, an unanswered ping fails the connection only after grpc.http2.ping_timeout_ms, which defaults to 60 s. grpc.keepalive_timeout_ms did not shorten this in my test.
With grpc.keepalive_time_ms=5000, grpc.http2.ping_timeout_ms=5000 and grpc.http2.max_pings_without_data=0, 40 reads against a frozen KurrentDB failed at 9.7 s with ServiceUnavailableError: Stream removed (ping timeout). The client read normally again after the unpause. Normal use with 5 s pings for about 95 s, with idle gaps up to 45 s, caused no too_many_pings errors.
Proposed change
Map KeepAliveInterval to grpc.keepalive_time_ms.
Also set grpc.http2.ping_timeout_ms from KeepAliveTimeout, so that an unanswered ping fails the connection in time.
Set grpc.http2.max_pings_without_data=0, so that pings continue while a call waits without data.
Thanks for the details @maarioos123 and the PR. As I mention in #39 (comment) this is fixed 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.
Activity
Fix keepalive gRPC channel options
johnbywater commentedon Oct 17, 2026
Thanks for the details @maarioos123 and the PR. As I mention in #39 (comment) this is fixed 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.