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

Too many open files error with go sdk user register and enroll #285

Open
kamalp2e opened this issue Dec 6, 2023 · 0 comments
Open

Too many open files error with go sdk user register and enroll #285

kamalp2e opened this issue Dec 6, 2023 · 0 comments

Comments

@kamalp2e
Copy link

kamalp2e commented Dec 6, 2023

While using go sdk User registration and user enroll it is found that connection established to ca node is not getting closed.
In below mentioned file on line number 473 inside defer function "err := resp.Body.Close()" body is getting closed but not the connection established with CA.
https://github.com/hyperledger/fabric-sdk-go/blob/main/internal/github.com/hyperledger/fabric-ca/lib/client.go

Solution to close the session is to modify the defer function as

defer func() {
err := resp.Body.Close()
c.httpClient.CloseIdleConnections() //Add this new Line to close connection
if err != nil {
log.Debugf("Failed to close the response body: %s", err.Error())
}
}()

connectionNotClosingPostRegistrationEnroll

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

No branches or pull requests

1 participant