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

fix: http connection leak in NewBearer() #387

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

kppullin
Copy link
Contributor

The response.Body from the first http.Get() call in NewBearer() is not closed. This leaks connections to the registry server and can result in substantial memory usage, as the registry allocates a 4MB buffer for each connection and neither end enforces an idle timeout.

Fixes #378

The `response.Body` for the first `http.Get()` call in `NewBearer()`
is not closed. This leaks connections to the `registry` server and
can result in substantial memory usage in the `registry`, as the
registry allocates a 4MB buffer for each connection and neither end
enforces an idle timeout.

Fixes enix#378
@paullaffitte paullaffitte merged commit 3d7560d into enix:main Aug 13, 2024
11 checks passed
@paullaffitte
Copy link
Contributor

Thanks for your contribution!

@kppullin kppullin deleted the fix-connection-leak-NewBearer branch September 16, 2024 18:06
@monkeynator
Copy link
Member

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Registry Pod OOMKilled
3 participants