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
socket.io slow/disconnected 2k connections #2664
Comments
What's the RAM usage like? You're Assuming you get the same issue with |
Server resources:
Application run with this options:
Also I have nginx on port 80, it works always fine. So, this is not related server hardware/lack resources. |
Hm, yes. But then I was saying that the ability for node to serve the socket.io.js file without timing out is nothing to do with socket.io itself. If you have actual transport issues through the sockets when a large number of clients are connected, then that may be attributable to this project. I just feel that serving that file is so basic that it wouldn't be socket.io's fault if it started timing out. Unless of course it was somehow blocking the thread. Could also be an issue with your code, are you sure you haven't got anything working synchronously or doing any heavy lifting that could be a bottleneck? |
I'm not a developer, I just sysadmin. I thinking this is some like memore leaking in node, becouse connections problem cause on all modules - socket.io, newrelic, etc. |
Is the output of your |
Yes, output when 2k connections. Server have 68G RAM free.
As you can see - leaking is present, node take 10G RAM and 153 connections:
Also this cause on any version of node - from 4.2 to 7 I dont want restart node when ram is high, couse it is not solution. I need resolve problem or change techniqe. |
Hi! Did you try to set a higher |
Yes. This is not help. |
@ARogovsky Is there anything in your system/dmesg log? My guess is your limit is maxing out at 2048, which is most likely some sort of system limit What about iptables conntrack? I've seen similar issues where heavy traffic from localhost.PHP -> localhost.Memcache was being dropped due to the conntrack kernel/iptables module running out of 'bucket' space. |
What is "2048 system limit"? I dont understand it. All possible limits is increased. |
I don't know, I was just saying it seems likely to be some sort of system limit if its failing around 2000 every single time. The point @MaffooBristol was making, is that when you do a wget with http://localhost:8888/socket.io/socket.io.js it's not testing socket.io or your websocket server. Its simply requesting a javascript file via HTTP (from nginx, or node/express etc). What is in your system logs and nginx logs when your wget fails? |
No errors in system/nginx/other logs. Problem only related nodejs/socket.io. |
When connections start timing out, does it ever recover if you leave it long enough? Or it just stays that way indefinitely until node is restarted? |
Sometime it recovery, sometime need restart node. |
I think you should just pass it back to your developers, and ask them to add some more logging to troubleshoot it For all we know, your node server could be getting an unhandled exception, causing it to crash and then be restarted by pm2 or something. |
Closed due to inactivity, please reopen if needed. |
Hi.
I have simple web chat based on socket.io. When chat get 2k connections - socket.io slow/disconnected:
Any advices?
The text was updated successfully, but these errors were encountered: