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

CURLOPT_MAXAGE_CONN: the maximum allowed age for connection reuse #3782

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 15, 2019

... and disconnection too old ones. The limit is right now set hardcoded
to 120 seconds. We can consider offering a configurable value in the
future.

@jay
Copy link
Member

jay commented Apr 16, 2019

I suggest a ref to #3722 in your commit message since some discussion took place there.

@bagder
Copy link
Member Author

bagder commented Apr 17, 2019

I elaborated on this change a bit on the mailing list and opened for feedback.

@bagder bagder changed the title ConnectionExists: only reuse relatively fresh connections CURLOPT_MAXAGE_CONN: the maximum allowed age for connection reuse Apr 18, 2019
captain-caveman2k referenced this pull request Apr 18, 2019
... and disconnect too old ones. The limit is right now set hardcoded to
120 seconds. We can consider offering a configurable value in the
future.

Ref: #3722
Closes #3780
@bagder
Copy link
Member Author

bagder commented Apr 19, 2019

oops! 😄

... and disconnect too old ones instead of trying to reuse.

Ref: #3722
Closes #3782
@pps83
Copy link
Contributor

pps83 commented Apr 19, 2019

I elaborated on this change a bit on the mailing list and opened for feedback.

I think forcing it to 120s isn't ok for those who intentionally rely on TCP_KEEPALIVE and long living connections. IMO it should be configurable and set to some kind of reasonable value by default (120s seems ok).

@bagder
Copy link
Member Author

bagder commented Apr 20, 2019

As you can see in this patch set, it is now configurable and is at 118 seconds by default.

@bagder
Copy link
Member Author

bagder commented Apr 20, 2019

TCP KEEPALIVE is rarely helping beyond the first few minutes since the time here is usually limited by how long the remote server keeps the connection alive. That's commonly limited to a few minutes at the most.

@bagder bagder closed this in e649432 Apr 21, 2019
@bagder bagder deleted the bagder/maxage-reuse-conn branch April 21, 2019 21:07
@lock lock bot locked as resolved and limited conversation to collaborators Jul 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants