-
Notifications
You must be signed in to change notification settings - Fork 20
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
containeranalysis: close grpcClient #50
Conversation
In `containeranalysis.NewClient()`, we allocate a containeranalysis client, but only use the `.GetGrafeasClient()` member. This results in leaking the containeranalysis client's connection pool, whenever a new client is created. Longer term, we should look at reusing connections as an alternative solution to this leak: there are other performance advantages. Co-Authored-By: Brian Chen <[email protected]> Co-Authored-By: Aline Shulzhenko <[email protected]>
_lynnsh noted from https://pkg.go.dev/cloud.google.com/go/containeranalysis/apiv1#Client.GetGrafeasClient
I think that comment is out of date, opened googleapis/google-cloud-go#5217 to confirm or deny this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool! thanks for showing us how we can use pprofile to identify problems! this makes sense!
This is behaving great in our test environment, and closing #20 |
In
containeranalysis.NewClient()
, we allocate a containeranalysisclient, but only use the
.GetGrafeasClient()
member.This results in leaking the containeranalysis client's connection pool,
whenever a new client is created.
Longer term, we should look at reusing connections as an alternative
solution to this leak: there are other performance advantages.
Co-Authored-By: Brian Chen [email protected]
Co-Authored-By: Aline Shulzhenko [email protected]
Related