-
Notifications
You must be signed in to change notification settings - Fork 337
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
A possible file descriptor leak in ClientManager? #99
Comments
@cissoid Odd. Once the Each client has its own |
I took a look at go source code. After connection created, there will start a new goroutine to run read loop, so there's should have another reference point to the connection, see https://github.com/golang/net/blob/master/http2/transport.go#L573. The read loop will close connection only if keepalive on current connection is disabled, and exit loop only when read error, see https://github.com/golang/net/blob/master/http2/transport.go#L1458. I'm not sure but this might be the reason. |
@cissoid That behavior makes sense, I suppose. We could set |
@dwieeb That not works, |
Please ensure that you are using the latest version of the master branch before filing an issue.
Also make sure to include logs (if applicable) to help reproduce the issue by setting the
GODEBUG=http2debug=2
env var.What version of Go are you using?
go version
1.9.2
What OS and processor architecture are you using?
go env
linux amd64
What did you do?
Here's my code simulate the situation which reach the
MaxAge
:What did you expect to see?
ClientManager create a new client, and the underlying connections of old client should be closed by GC or call client.CloseIdleConnections().
What did you see instead?
netstat
andlsof
shows that number of open connections keep increasing.Maybe ClientManager should close idle connections on removing old client?
If do this so, what if another goroutine using the same client while we call client.CloseIdleConnections()?
The text was updated successfully, but these errors were encountered: