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

busy loop in transportMonitor #1525

Closed
tsuna opened this issue Sep 15, 2017 · 3 comments
Closed

busy loop in transportMonitor #1525

tsuna opened this issue Sep 15, 2017 · 3 comments

Comments

@tsuna
Copy link
Contributor

tsuna commented Sep 15, 2017

Please answer these questions before submitting your issue.

What version of gRPC are you using?

Commit bb78878

What version of Go are you using (go version)?

Go 1.9

What did you do?

When connecting to a gRPC backend through a load balancer like HA Proxy, if the load balancer decides to close the connection immediately (e.g. because there is no backend available), gRPC will attempt to reconnect immediately.

What did you expect to see?

gRPC should back off before trying to reconnect

What did you see instead?

gRPC is tying to reconnect thousands of times per second.

The issue comes from the loop in transportMonitor() in clientconn.go. When the backend closes the connection, we wake up in case <-t.Error(): with an EOF error, then we do if err := ac.resetTransport(false); err != nil { and this works because we are able to connect to the load balancer again, so then we loop again. But the new connection gets almost instantaneously closed again by the load balancer, leading to a quasi-busy loop in transportMonitor() and a ton of log spam.

@tsuna
Copy link
Contributor Author

tsuna commented Sep 18, 2017

Probably a dup of #954

@tsuna
Copy link
Contributor Author

tsuna commented Sep 19, 2017

or of #1444...

@dfawley
Copy link
Member

dfawley commented Sep 19, 2017

Yes, definitely a dupe. Thanks for the report.

@dfawley dfawley closed this as completed Sep 19, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants