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

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

This comment has been minimized.

Copy link
Member

commented Apr 16, 2019

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

@bagder

This comment has been minimized.

Copy link
Member Author

commented Apr 17, 2019

@bagder bagder force-pushed the bagder/maxage-reuse-conn branch from e206287 to 6750797 Apr 18, 2019
@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

This comment has been minimized.

Copy link
Member Author

commented Apr 19, 2019

oops! 😄

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

Ref: #3722
Closes #3782
@bagder bagder force-pushed the bagder/maxage-reuse-conn branch from 4da30d1 to d5a39d3 Apr 19, 2019
@pps83

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2019

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

@bagder

This comment has been minimized.

Copy link
Member Author

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 Apr 21, 2019
@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.
Projects
None yet
3 participants
You can’t perform that action at this time.