Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

HTTP client: Add maxFreeSockets option #5839

Closed
isaacs opened this issue Jul 12, 2013 · 2 comments
Closed

HTTP client: Add maxFreeSockets option #5839

isaacs opened this issue Jul 12, 2013 · 2 comments
Labels
Milestone

Comments

@isaacs
Copy link

isaacs commented Jul 12, 2013

Currently, sockets that are waiting around in a free state are not limited, except by the max number of sockets that you'll ever open.

So, if you set maxSockets:Infinity, so that you always open up a new one if none are available, then you could have quite a lot of free sockets left hanging around.

Add a maxFreeSockets option, so that you can limit the number of sockets left open in a free/pending state.

@geek
Copy link
Member

geek commented Sep 3, 2014

@isaacs do you remember the reason why its defaulted to 256?

@sudosoul
Copy link

sudosoul commented Sep 1, 2015

@geek this is both late and a guess, but I assume because 256 is a general minimum ulimit hosts have set.

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

No branches or pull requests

3 participants