Description
Windows will timeout a connection attempt after ~21s. Linux apparently waits much longer – around 3 minutes or more.
The connection pooling changes in 6.0 made it so that a pending connection is not associated with a specific request. As such, request cancellation no longer causes pending connections to be canceled. We do not impose any connect timeout by default (DefaultConnectTimeout = Timeout.InfiniteTimeSpan
), so we are now exposed to Linux’s long connection timeout. In case of small request timeouts, this may lead to a potentially big number of requests timing out as they try to wait/reuse the same "pending" connection.
We should set a default ConnectTimeout to something reasonably small. We should also consider backporting that to 6.0.
I propose to unify Windows and Linux timeouts, i.e. set DefaultConnectTimeout
to 21s.