Skip to content

Consider setting a finite ConnectTimeout by default #1678

Closed

Description

Starting with 6.0, the consequences of a connection attempt that takes a long time to fail, or somehow becomes stuck are much higher than before (memory leaks, more failed requests ...).

In .NET 7, we made a change in the connection pool where we will now cancel a connection attempt 5 seconds after the request that initiated it completes (or is canceled).

The main mitigation for this in 6.0 is to set SocketsHttpHandler.ConnectTimeout to a finite value. We should consider setting such a default in YARP.
My preference would be that we make the change regardless of target framework (also change it for 7.0).

See #1833 (comment) for more context on this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions