8000 [27.x backport] client: prevent idle connections leaking FDs by laurazard · Pull Request #48764 · moby/moby · GitHub
[go: up one dir, main page]

Skip to content

Conversation

laurazard
Copy link
Member
@laurazard laurazard commented Oct 25, 2024

Patch from tonistiigi@af6ada9

- What I did

Without this change, if a long-lived process is using the client, idle connections are not released and grow over time.

We can also look into addressing this issue from the server side, but it doesn't hurt for the client package to have good defaults and not cause this.

- How I did it

Set MaxIdleConns and IdleConnTimeout on the defaultHTTPClient.

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Patch from tonistiigi@af6ada9

Without this change, if a long-lived process uses the client and creates
connections, these connections are not released and grow over time.

We can also look into addressing this issue from the server side, but it
doesn't hurt for the `client` package to have good defaults and not
cause this.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit 5c72a95)
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
@laurazard laurazard added this to the 27.4.0 milestone Oct 25, 2024
@laurazard laurazard self-assigned this Oct 25, 2024
@laurazard laurazard added the kind/bugfix PR's that fix bugs label Oct 25, 2024
Copy link
Member
@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah thaJeztah merged commit 5c383ad into moby:27.x Oct 25, 2024
144 checks passed
@thaJeztah thaJeztah linked an issue Oct 25, 2024 that may be closed by this pull request
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.

client idle connections leak FDs against Docker Desktop
2 participants
0