-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
- Change DefaultPooledConnectionIdleTimeout from 120 seconds to 110 seconds - This should reduce the occurrence of socket errors when connected to IIS or Kestrel
Tagging subscribers to this area: @dotnet/ncl Issue Details
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
|
Why not make it even smaller, e.g. 60 seconds? 110 is a weird number. 60 seconds seems like plenty. |
I changed it to 60 seconds. |
@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. |
I think it is ok. We would generally see more handshakes for anybody with 1m repetition. |
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. |
There was a problem hiding this 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.
We should update the docs, it still contains 2 minutes as default: https://docs.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler.pooledconnectionidletimeout?view=net-6.0 |
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