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

Reduce DefaultPooledConnectionIdleTimeout default #52687

Merged
merged 2 commits into from
May 25, 2021
Merged

Conversation

halter73
Copy link
Member

@halter73 halter73 commented May 13, 2021

  • Change DefaultPooledConnectionIdleTimeout from 120 seconds to 60 seconds
  • This should reduce the occurrence of socket errors near the timeout when connected to IIS or Kestrel

See #52267 (comment)

Here's the similar PR for Kestrel to increase its KeepAliveTimeout: dotnet/aspnetcore#32636

Other servers have even smaller default keep-alive timeouts, but I still think this is a good change.

We'll need to update the API docs at https://github.com/dotnet/dotnet-api-docs/blob/2238750cc696339f0a8f04c786f7fe03b14e51ec/xml/System.Net.Http/SocketsHttpHandler.xml#L623

Addresses #52267

@geoffkizer

- Change DefaultPooledConnectionIdleTimeout from 120 seconds to 110 seconds
- This should reduce the occurrence of socket errors when connected to IIS or Kestrel
@ghost
Copy link

ghost commented May 13, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Change DefaultPooledConnectionIdleTimeout from 120 seconds to 110 seconds
  • This should reduce the occurrence of socket errors near the timeout when connected to IIS or Kestrel

See #52267 (comment)

Here's the similar PR for Kestrel to increase its KeepAliveTimeout: dotnet/aspnetcore#32636

We'll need to update the API docs at https://github.com/dotnet/dotnet-api-docs/blob/2238750cc696339f0a8f04c786f7fe03b14e51ec/xml/System.Net.Http/SocketsHttpHandler.xml#L623

Addresses #52267

@geoffkizer

Author: halter73
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@geoffkizer
Copy link
Contributor

Why not make it even smaller, e.g. 60 seconds? 110 is a weird number. 60 seconds seems like plenty.

@halter73
Copy link
Member Author

halter73 commented May 13, 2021

I changed it to 60 seconds.

@geoffkizer
Copy link
Contributor

@scalablecory @karelz @dotnet/ncl Any opinions/concerns here?

I think this is a reasonable change.

Note this timeout matches WinHttp, it also uses 60s as the default.

@wfurt
Copy link
Member

wfurt commented May 13, 2021

I think it is ok. We would generally see more handshakes for anybody with 1m repetition.

@karelz
Copy link
Member

karelz commented May 13, 2021

Personally I am fine with either 110 or 60 (small preference to 110 as it is closer to original value, but not significant preference). Up to others to decide.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@geoffkizer geoffkizer merged commit b81fac2 into main May 25, 2021
@akoeplinger akoeplinger deleted the halter73/52267 branch May 26, 2021 20:02
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@ManickaP
Copy link
Member

ManickaP commented Dec 2, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants