-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
While starting managed channels on client we get error: Channel for target was not shutdown properly!!!
#4032
Comments
It means you didn't call |
can you help me understand how to cleanly clean up after channels? so if i understand, when calling
should we be wrapping this in a
?? |
You can do that, but it would be surprising if you only started a Channel for making one RPC. If that is your use case, then the snippet you propose is correct. |
@carl-mastrangelo so... i think i'm understanding this. if you create a channel, but then do not hang onto the reference, it will GC then this error is gonna spit out. we didn't see this in 1.6.1. was this new? did you add this to prevent connection leaks? make them errors versus silent failures? confused why it just happened after upgrade from 1.6.1 to 1.8.0 |
@nddipiazza It was added I think after 1.6. Internally, we have a similar mechanism because it causes the connections to get torn down abruptly, which is bad from the server's perspective. At least at Google, several teams have monitoring and metrics for unexpected errors which can cause alerts. When a channels is GC'd this causes those numbers to go up. Closing down cleanly denoises those numbers. (Also, in our case at least, pretty much every server is also a client, so everyone benefits if shutdown happens normally). |
What version of gRPC are you using?
1.8.0 (and we also saw this in 1.9.0)
We get this error message when starting up a client.
Is this because a previous channel failed to be shut down correctly and now we are starting up another one?
The text was updated successfully, but these errors were encountered: