Skip to content

connection pool: idle connection never closed #168

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

Closed
weissi opened this issue Feb 26, 2020 · 1 comment · Fixed by #170
Closed

connection pool: idle connection never closed #168

weissi opened this issue Feb 26, 2020 · 1 comment · Fixed by #170
Labels
kind/enhancement Improvements to existing feature.

Comments

@weissi
Copy link
Contributor

weissi commented Feb 26, 2020

Currently, the pool keeps idle connections open indefinitely (or until the server closes). That is okay from a correctness point of view but may lead to a very large number of open connections when for example implementing a crawler.

@weissi weissi added the kind/enhancement Improvements to existing feature. label Feb 26, 2020
@PopFlamingo
Copy link
Contributor

@weissi Should this be a new global setting on the client that would apply to all of its connections?
Maybe we could set it to an acceptable default value, and if needed expose it as a new Configuration property the user can set.

weissi added a commit that referenced this issue Mar 3, 2020
* Close idle pool connections

Motivation: Pooled connections should close at some point (see #168)

Changes:
- Add new poolingTimeout property to HTTPClient.Configuration, it's
default value is .seconds(60), it can be set to nil if one wishes to
disable this timeout.
- Add relevant unit test

Co-authored-by: Johannes Weiss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements to existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants