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
What version of gRPC and what language are you using?
1.62.2, Python
What operating system (Linux, Windows,...) and version?
Mac OS, Sonoma 14.4.1
Linux, custom Docker image based on Ubuntu 26
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.12
What did you do?
I put a sleep in the greeter_server.py example. I then ran the greeter_client.py and async_greeter_client.py examples, with GRPC_VERBOSITY=INFO GRPC_TRACE=http2_ping.
I then modified async_greeter_client.py to explicitly set keepalive_time_ms to INT_MAX, which is the documented way to disable keepalive. The behavior did not change.
What did you expect to see?
According to the documentation, there should be no client-side grpc keepalive pings by default.
What did you see instead?
Logs indicate that client-side keepalive pings are enabled:
One further note: with keepalive explicitly disabled, I don't see this logging regarding the TCP_USER_TIMEOUT, so it appears that the timeout is not being set. I'm not sure if this is a bug, since the timeout should be set if and only if keepalive is enabled, and as explained above, it appears that keepalive is always enabled.
What version of gRPC and what language are you using?
1.62.2, Python
What operating system (Linux, Windows,...) and version?
Mac OS, Sonoma 14.4.1
Linux, custom Docker image based on Ubuntu 26
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.12
What did you do?
I put a
sleep
in thegreeter_server.py
example. I then ran thegreeter_client.py
andasync_greeter_client.py
examples, withGRPC_VERBOSITY=INFO GRPC_TRACE=http2_ping
.I then modified
async_greeter_client.py
to explicitly setkeepalive_time_ms
toINT_MAX
, which is the documented way to disable keepalive. The behavior did not change.What did you expect to see?
According to the documentation, there should be no client-side grpc keepalive pings by default.
What did you see instead?
Logs indicate that client-side keepalive pings are enabled:
Note this line:
writing.cc:141
is pretty clearly logging for an http2 keepalive ping being sent by the client.Anything else we should know about your project / environment?
You can see the
sleep
I added, plus the shebangs I added to make the examples runnable as scripts, here: https://github.com/grpc/grpc/compare/v1.62.2...BatmanAoD:grpc:report-python-client-keepalive?expand=1The text was updated successfully, but these errors were encountered: