Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust client keepalive timeout to avoid random keepalive timeout error #87

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

windtalker
Copy link
Contributor

@windtalker windtalker commented Mar 21, 2022

Signed-off-by: xufei [email protected]

Sine we set GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS to 1, client channel will keep sending keepalive pings when there is no outstanding streams, and in the implementation of grpc-core, for client channnels without activing polling threads(which in my understanding, client channel without any outstanding streams will eventually get into this situation), it uses backup poller to poll the message(including the ping ack), and the backup polls are run in the timer threads and the default poll interval is 5000ms. So we need to set the keepalive timeout as (5000 + x)ms, where x ms is the shortest timeout threshold in the worst case.

@hanfei1991 hanfei1991 merged commit bd2ea65 into tikv:master Mar 21, 2022
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.

2 participants