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

RFE: Improve readTimeout handling #624

Closed
pjdarton opened this issue Feb 22, 2018 · 1 comment
Closed

RFE: Improve readTimeout handling #624

pjdarton opened this issue Feb 22, 2018 · 1 comment
Assignees

Comments

@pjdarton
Copy link
Member

Some time ago, I introduced a readTimeout field.
I've since found that this doesn't go far enough...

  • What we want is to have a nice short readTimeout normally so that docker API calls that should complete quickly will either succeed or fail quickly, thus preventing the plugin from locking up.
  • However there are some long running operations which fail if we have a "nice short readTimeout", e.g. a docker pull operation doesn't return until it's complete and a docker image build can go quiet (so no new data to read) while it's processing lengthy "apt get" commands and similar.

It seems to me that DockerAPI needs to provide different connections with different timeouts for different operations.
...and if it's going to do that then we really need to ensure that we don't end up leaking connections (which we can do at present, see #615 and #617).

What I think we should do is to make DockerAPI cache connections using a Guava cache (or similar) that's set to throw stuff away (closing it first) if it hasn't been used for ages, and support having a normal "readTimeout", a "docker pull timeout" and maybe other timeouts too (TBD).

Note: Whilst this note is partly a "note to self" as a precursor to me getting on and doing it myself, I'd also appreciate hearing others' opinions on this.

@pjdarton
Copy link
Member Author

Merged.
It'll be in the next release.

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