-
Notifications
You must be signed in to change notification settings - Fork 725
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
memory leak on Node v0.10 #35
Comments
The newest version 0.10.2 works fine with me. 0.6.0 is not. with 0.6.0, CPU usage shoots to 100% and the thread exits unexpectedly quite often. |
Might this be the reason for the mem leak?
More info is at http://nodejs.org/api/stream.html#stream_compatibility |
@zhuzhuor No, it isn't. |
node v0.10.4 shadowsocks 0.10 dev (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace at Socket.EventEmitter.addListener (events.js:160:15) at Socket.Readable.on (_stream_readable.js:653:33) at Socket.EventEmitter.once (events.js:179:8) at Socket.destroySoon (net.js:413:10) at Socket.onSocketEnd (net.js:261:10) at Socket.EventEmitter.emit (events.js:92:17) at TCP.onread (net.js:535:10) |
Used as proxy for xunlei for several hours and memory footprint starts to go up.
I'll check tomorrow after timeout 600s went out. |
Forcing gc() every few seconds seems help. c4ca466 |
Found a problem with crypto module nodejs/node-v0.x-archive#5949 |
Is it resolved now? can I update node to v0.10? |
迅雷不是Thunder吗。。。 |
Is this fixed on upgrade to 0.12 or iojs? From this "We have the new TLSWrap mechanism under the hood, this eliminates quite a few of the hops back and forth between JavaScript and our C++ implementations." so this would make the nodejs port at least faster I'd guess. IMHO this is not a leak, at least what you've linked on nodejs/node-v0.x-archive#5949. Despite this comment from one of top node hackers, from my own experience such greedy memory consumption is common also to Java. I guess node will do better GC job when system is really under memory pressure but otherwise, it will eat as much as it can, just like what Java do for decreasing overhead of OS malloc. |
@ebraminio Now I'm happy with Shadowsocks Python project. I can handle 10K connections with < 100MB RSS without having to think about GC. |
I'm working on a new version of shdowsocks-gui now. But I haven't touch shadowsocks-nodejs yet. If there's anybody who want to fork this project and keep working on it, I'd like integrate it into my shadowsocks-gui fork. |
nodejs 9.x ? |
This project has abandoned. |
nodejs now is on version 16. |
To complete the story, this is likely a backpressure related issue in earlier version of Streams, readable.pipe and stream.pipeline has been provided since v9 and v10 to free user from manual labor, and it's quite reliable nowadays. |
Using this parameter solves the memory problem. |
No description provided.
The text was updated successfully, but these errors were encountered: