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

Change docker http client to use handlers instead of results to avoid leaving open connections #232

Closed
wants to merge 1 commit into from

Conversation

rabelenda
Copy link

The http client was not correctly used which was leaving connections open not being able to reuse them, which caused at some point to reach the max connections per route.

We faced this particular issue when trying to build 2 images with 2 tags each: since the default limit of connections per route host is 2 (when using unix socket, not https since https has a hardcoded config of 10 connections per route host) when we tried to build the images the plugin was getting stuck trying to get more connections.

The change consists mainly in changing existing httpClient execute using result as return with proper ResponseHandlers so http client library automatically closes httpResponse s to release open connections.

… leaving open connections.

The http client was not correctly used which was leaving connections open and not being able to reuse, which caused at some point to reach the max connections per route. We faced this particular issue when trying to build 2 images with 2 tags each: since the default limit of connections per route host is 2 when we tried to build the images the plugin was getting stuck trying to get more connections.
The change consists mainly in changing execute with returns of result with proper ResponseHandlers so http client library automatically handles response automatic close to release open connections.

Signed-off-by: Roger Abelenda <rabelenda@gmail.com>
@rhuss
Copy link
Collaborator

rhuss commented Jul 24, 2015

Thanks a lot ! Merged into integration, will be available in the next release.

@rhuss rhuss closed this Jul 24, 2015
leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this pull request Aug 18, 2018
Upgrade docker-client dep from 4.0.8 to 5.0.1
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

Successfully merging this pull request may close these issues.

2 participants