Skip to content
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

RAM Usage, it seems each call is not closed, multiple TCP connections open #60

Open
Matej-Liska opened this issue Aug 24, 2023 · 2 comments

Comments

@Matej-Liska
Copy link

Matej-Liska commented Aug 24, 2023

Hi, I have found out there is some issue with unifi-request node (after updating UDMPro to latest version), which causes high RAM usage after some time (12hrs?).

I have this simple flow where which can be seen on screenshot below. Basicaly it GETs, JSON data from cameras (3x), every 2 seconds (motion detection). I did a bit of research and found out that it seems each call of this node is maybe not being closed - meaning there is a huge amout of opened TCP connections after some time. Please see NETSAT output to get an idea. I think this is root cause.

In the past before UDM update it was allright, but now I had to disable it because it lagged whole NR after some time (high RAM, high CPU).

System info:
RPi4 2GB
UDM Pro v3.1.15
Node-red 2.2.2.
node-red-contrib-unifi-os 0.9.0

Please could you look into it? Thanks & keep up the good work 🥇
Nodes
NETSTAT opened connections

@crxporter
Copy link
Member

@marcus-j-davies have you seen this one? Are you bored this weekend?

@hjuhlin
Copy link

hjuhlin commented Nov 30, 2023

I have the same error:

I have gotten a lot of enobufs (WSAENOBUFS) errors in Windows lately. After a lot of searching I did find a command (netstat -ab) to view open connections to find the problem.

When running netstat -ab I did find out that node-red was the problem for all of my enobufs problems. And mostly Unifi connections (and some others).

So I have MANY connections that are not closed to my UMD-Pro
[node.exe] TCP 192.168.1.4:64755 unifi:https ESTABLISHED

After running node-red for 12 hours I have around 2300 open connections in node-red and around 2/3 of them are to unifi. The other 1/3 are to Shelly components.

The command netstat -nao | find /i "estab" /c shows the total sum of connections that are established and that number just keeps growing until I restart node-red.

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

No branches or pull requests

3 participants