After going to 2024.11.2 I see a huge CPU usage for Node-Red, anybody else?

Hi All
I have a four core i5, and I’ve given 2 cores to HA. It usually hovers around 10-20% cpu usage.
After going to 2024.11.2 of HA, it suddenly uses 101% CPU, and Node-red alone uses 50%.
If I shut down Node-Red, everything is cool again.
I have updated all the modules in Node-Red, and I have updated all the HA nodes as well.
After updating this, I now have 134 ‘wrong’ HA nodes, which I’m looking into now, so that might be why the big cpu spike.
Has all the HA nodes changed the way they work?

Ok, so now I have to enter the entity into the data field for the tts.cloud_say, giving me no way of selecting the entity from a list, and making openings for all sorts of spelling error, geeez, this is going downhill.

FWIW, I have the same versions on 2 HA instances and no cpu issues at this moment.

Did you reboot the entire system already?
Anything in the node red or HA log?

Nothing in the logs.
I’ve gone through all the warnings in Node-Red, because the nodes have changed to action, and a lot of them no longer allows selection of entities, but you have to give them in data, a big step backwards.
I also have mqtt integration, so I’ll try and set that up from scratch again.

Oh, and I did reboot the entire VM on proxmox

I redid the MQTT, changing it to protocol v5, no real change in CPU load. it hovers 80-90%, spiking to 103%.
I do have quite a few HA node warnings in Node-Red, because I have a lot of christmas lights that are not yet online.
I also get warnings for temporary scenes that are only created for holding the oringal state of the lights, when I set another scene, and then when that is over, it is switched back to the original state. So the scenes only exist during a short time.

So getting forward on this weird thing. I’m getting profoundly confused.
I’ve gotten the CPU load down, I exported all the flows, then deleted the Node-red addon as well as any directories left over from way back (before node-red was moved to the addon-config folder).

I then reinstalled the node-red, and I’ve imported all my flows again. As well as updated all the nodes in the manage palette.

I now have a few node-types missing, and I’m hesitant in reinstalling them.
I also have a MQTT integration in Node-red I’ve removed.

So now the CPU load hovers around 15-30% which is what I would expect.
It still spikes to 100%, but that is to be expected.

What I’m really puzzled about is that I don’t see any Home Assistant entities in Node-Red now, it seems to work, but if I go to select an entity in a node, nothing is shown in the list, the list is empty.
Also, it doesn’t show the small timestamps for when a node is executed.

My Server node for HA looks like this:

Looking in the Node-red logfile:

-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 18.1.1
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.2  (amd64 / qemux86-64)
 Home Assistant Core: 2024.11.2
 Home Assistant Supervisor: 2024.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-customizations: starting
s6-rc: info: service init-customizations successfully started
s6-rc: info: service init-nodered: starting
s6-rc: info: service init-nginx successfully started
up to date, audited 129 packages in 3s
47 packages are looking for funding
  run `npm fund` for details
5 high severity vulnerabilities
To address all issues (including breaking changes), run:
  npm audit fix --force
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.9.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
npm notice To update run: npm install -g [email protected]
npm notice
s6-rc: info: service init-nodered successfully started
s6-rc: info: service nodered: starting
s6-rc: info: service nodered successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[15:38:06] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js
17 Nov 15:38:08 - [info] 
Welcome to Node-RED
===================
17 Nov 15:38:08 - [info] Node-RED version: v4.0.3
17 Nov 15:38:08 - [info] Node.js  version: v18.20.4
17 Nov 15:38:08 - [info] Linux 6.6.54-haos x64 LE
17 Nov 15:38:08 - [info] Loading palette nodes
17 Nov 15:38:08 - [info] Node-RED Contrib Theme Collection version: v4.0.10
17 Nov 15:38:10 - [info] Dashboard version 3.6.5 started at /endpoint/ui
17 Nov 15:38:11 - [info] node-red-contrib-home-assistant-websocket v0.74.2 nodes initialized
17 Nov 15:38:11 - [info] Settings file  : /etc/node-red/config.js
17 Nov 15:38:11 - [info] Context store  : 'default' [module=memory]
17 Nov 15:38:11 - [info] User directory : /config/
17 Nov 15:38:11 - [warn] Projects disabled : editorTheme.projects.enabled=false
17 Nov 15:38:11 - [info] Flows file     : /config/flows.json
17 Nov 15:38:11 - [info] Server now running at http://127.0.0.1:46836/
17 Nov 15:38:12 - [info] Waiting for missing types to be registered:
17 Nov 15:38:12 - [info]  - counter-loop
17 Nov 15:38:12 - [info]  - schedex
17 Nov 15:38:12 - [info]  - within-time-switch
17 Nov 15:38:12 - [info]  - time-inject
17 Nov 15:38:12 - [info]  - wled2
[15:38:12] INFO: Starting NGinx...

What on earth do I do?

I got a bit further now, I removed the schedex node, and after doing that the timestamps and entities show up, the CPU load is still low

It’s stabile again, apperently two nodes made it go haywire, odd what triggered it, one was a beta

  • node-red-contrib-schedex
  • node-red-contrib-sun-position

After removing them, it the CPU load went back to normal.
Now I just have to figure out what to do instead of them, any ideas on how to replace schedex, schedex could execute based on time it got through the flow, so I could set a time in HA, and it would be the time it executed in node-red. I used this for setting the time to lower the temperatures for the thermostats.
The schedex could maybe be replaced with eztimer?
The sun-position should be available in a ‘native’ module I think.

1 Like

It seems the problem is also related to the HA version and the Supervisor, as the CPU spike last night, despite the ‘problematic’ nodetypes were uninstalled

Ok, it was mostly wrong, and a case of bad timing.
At the same time of the upgrade to the new HA, I had a powersupply failing, leading to a bunch of fans not working putting cold air into the rack, this lead to the fan in the NUC running my proxmox with HA, failed, thus leading to thermal throttle on the CPU.
The two node-red nodes are still bad, but at least after removing them it doesn’t make everything go sideways.
Case closed for me.