SOLVED [UPDATE] Add-on: nodered high cpu and log file path not found

Hi,
On my raspy 4 I have installed nodered add-on and it’s working.
After hours cpu utilization HA CPU goes up from <10% to 70%. Nodered add on shows CPU raising from 2% to 36% same time.
To analyze, I have set log_level to “debug”.
Q1: Supervisor/Nodered/Log only show the last few minutes from the log. How can I increase that?
Q2: Where do I find the complete Logfiles from nodered (path). I found nothing on the pi in the filesystem.
Q3: Is there a nodered monitor available to better monitor CPU and RAM utilization?
See screenshots.
Thanks for answers!



There is a nodered log tab on the page that you posted. There are also catch nodes that you can setup on each page to catch errors.

When it is high like that I would open NR and start disabling entire flow pages, double click on the page tab, when side dialog opens, bottom left corner, disable. I would do one at a time renabling the prior page before disabling another.

I suspect that a node or a flow is causing this.

Thank you. The log tab on that page only shows the last 2 minutes. That doesn’t help.
See also Supervisor/Nodered/Log only shows last 2 minutes · Issue #1202 · hassio-addons/addon-node-red · GitHub

Inside settings.js in the nodered folder inside config, set logging metrics to true and restart nodered. This adds a memory dump every 15 sec. to the log output. When it is ramped up, you should see what is causing it.

Thank you, that works!
BUT I only see the last 2 minutes in supervisor/redmatic/logs.
I don’t see any logging messages from nodered neither in home-assistant.log nor in any other .log file.

Solved.
After days of testing/reducing workload NR is now stable.
I have disabled VirtualDevices and CUxD in the settings of cpu-connection node of node-red-contrib-ccu add-on. See screenshot.
It now runs stable since 5 days. SEE UPDATE BELOW, ROOT CAUSE FOUND!! ITs NOT CUxD!
Thank you.

[UPDATE]
Now I have found the root cause: When you have the CCU Adress defined with DNS Name (see “cpu-prod.fritz.box” above), then after hours in combination with traffic from CCU, the HASS DNS service stops working and the CPU goes high. Using direkt IP Adress for CCU Adress e.g. 192.168.178.55, is stable, CUxD included.
I can reproduce and see that a ping to the CCU address is denied with “bad address” while another ping to philips hue bridge works fine. Also the ping to the CCU (both with DNS name and IP address) works fine at the same time, when firing from my mac.
SOLUTION: Do not use DNS name, use IP address.

1 Like

Im having a similar issue, but i dont follow the CCU Adress. I dont see where I would have set DNS name in the addon config or in NodeRed itself.

I know it’s a while ago, but I wanted to say thanks for this tip! This allowed me to find a runaway flow I put together that was consuming nearly 30% cpu resources!