request: Too many sockets of Ubuntu with 'CLOSE_WAIT'
request version: 2.76.x system: Ubuntu
I’m using request via proxy with TLS, and after a long time I have thousands of socket ports in CLOSE_WAIT status, I google it , and find maybe the remote server force close my socket would lead to this, but what I want is to detect the event and close the socket gracefully or the ports will be exhausted and the process would never work.
Dose this related to #2438 ?
Thanks.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 33 (5 by maintainers)
Hey, @mikeal , Do you have chance to merge my request to tunnel-agent? It has big impact to long live program with proxy. Currently we have to write npm-shrinkwrap to revert back the version. You’ve see so many people have the same problem and my code fix it well, mentioned in this issue. I want to know how can you merge it, and if you’re not in charge of this repo so who else should I contact ? Or is there any other steps I missed. Also pls pay attention to this comment @simov @mscdex , Hope to make it recently, thank you so much. 😃
@kazaff please refer to https://github.com/bda-research/tunnel-agent/tree/callback, it’s easy to fix, but deep enough. Before merged to master and republished, you can use my repo as a dependency.
Please reopen this issue, even npm-shrinkwrap is included in the project, didnt’t work now.
+1 I’m running on Ubuntu and this issue can easily cause node to balloon to thousands of sockets. Also, there was a PR that applied options.timeout to the CONNECT request, that would also be useful.