-
Notifications
You must be signed in to change notification settings - Fork 570
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
Limit the maximum numbers of open sockets #3268
Comments
The global dispatcher or the overall default Client/Agent settings? |
Both are good ideas. |
The Elasticsearch client library (of which I am the current maintainer) currently has an open request from the Kibana team to support limiting the maximum open sockets and max idle sockets when keepalive is enabled. If this functionality is added to Undici, it would be helpful if it exposed options to limit the max open and max total sockets, both globally and per upstream target, as well as max free sockets for keepalive use cases, to provide parity with
I've not contributed to this library before, but would love to help add this functionality. |
Overall, I think this should be already doable (unless I'm overlooking at something). By using
The options listed should be ported to the
Would you like to send a PR for it? |
@JoshMock this is already possible at Pool level. |
One of the first issues with "fetch failed" is that we don't limit the number of outgoing sockets, and the process runs out of them, triggering a timeout error.
I think we should add a limit of 127 per pool by default (or any other magic number)
The text was updated successfully, but these errors were encountered: