-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Server Keep Alive Params aren't killing connections #2607
Comments
Can you turn on logs and see if the client stays READY all the time: https://github.com/grpc/grpc-go#how-to-turn-on-logging? |
I am assuming its reconnecting so quickly it goes back to READY immediately? Is there a way to turn retries/reconnections off? |
Right. We do exponential backoff, and the first retry happens very fast (1 second initial backoff). The backoff is also reset when a connection is created, which will happen in your test because server only closes connections after they are created for 1 second. So you will always see the initial 1 second backoff. There's currently no way to stop reconnecting. If you don't want to keep the idle connections, and know that you won't need it for some time, you can close the ClientConn and recreate it later. This will introduce some overhead though. |
Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.15
What version of Go are you using (
go version
)?go1.11.1 darwin/amd64
What operating system (Linux, Windows, …) and version?
Mac OS High Sierra 10.13.6
What did you do?
Start a gRPC Server using
and then connect to it with a local client and print out state
What did you expect to see?
Expect for a an idle connection the connection to be shutdown i.e. the state in the for loop should change
What did you see instead?
The state continues to stay as READY
The text was updated successfully, but these errors were encountered: