node-webrtc icon indicating copy to clipboard operation
node-webrtc copied to clipboard

100% CPU usage

Open gev opened this issue 4 years ago • 7 comments

Hi!

I have 100% cpu usage (use only a data channels). Think, after close or open new peer.

Need a help how to debug or get more info/logs to detect a leak

gev avatar Apr 26 '20 12:04 gev

Hi did you notice any memory leakage? i have similar problem, cpu and memory both increasing. i created the issue at https://github.com/node-webrtc/node-webrtc/issues/612 please check if you also have similar issue with memory and cpu..

savsofts avatar Apr 27 '20 11:04 savsofts

@savsofts I haven't any memory leakage. Some time have a lot node threads only.

gev avatar Apr 27 '20 20:04 gev

Found out new beahaver https://github.com/node-webrtc/node-webrtc/issues/614

gev avatar Apr 29 '20 20:04 gev

@gev Are you using data channel to sent text or any kind of string? in my project i preferred group chat functionality based on websocket. Also sending 2 min audio

savsofts avatar Apr 30 '20 10:04 savsofts

@savsofts only text

gev avatar Apr 30 '20 14:04 gev

@gev what is the configuration of your system (cpu, ram,uplink)?

savsofts avatar Apr 30 '20 15:04 savsofts

We've detected something similar. Seems like sometimes connections would fail (connectionState becoming failed) after some time they got connected (possibly caused by the number of peers on the machine going up), and when they become failed, the node process starts using 100% CPU, and the connection restart logic can't re-establish connections (actually, it seems any other connection on the same process also become unusable).

andrevmatos avatar Oct 10 '20 20:10 andrevmatos