# Hmmm, Node-RED grinds to a halt and is restarting. Any Ideas?

**URL:** <https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134>\
**Category:** General\
**Created:** [26 May 2026 17:46 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134 "2026-05-26T17:46:43Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 May 2026 13:03 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/21 "2026-05-27T13:03:27Z")

</div>

> [@Colin](#):
>
> Disable flows

May also need to stop node-red, check that all node-red processes have gone away and then restart node-red.

> [@mudwalker](#):
>
> Nuclear Option...

You can simply stop node-red, delete the `~/.node-red/node_modules` folder and then run `npm install` from the `~/.node-red/` folder before restarting node-red.

As suggested above, check to ensure that all node-red related processes have gone away before restarting.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 13:04 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/22 "2026-05-27T13:04:10Z")

</div>

It was what I have been doing. Or at least to node-red-safe.

I will try again. If node-red-safe is consuming a lot, what do you recommend?

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 13:06 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/23 "2026-05-27T13:06:50Z")

</div>

(I have tried re-installing Nore-RED a couple of times since the problem Dave's script.)

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 13:36 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/24 "2026-05-27T13:36:46Z")

</div>

Another question. Should I just stop and start NR, or should I do a complete reboot?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 May 2026 13:42 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/25 "2026-05-27T13:42:41Z")

</div>

Firstly stop nr and check htop to make sure that all of the node-red processes have gone away.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 13:44 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/26 "2026-05-27T13:44:09Z")

</div>

Just going through that now!

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 14:05 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/27 "2026-05-27T14:05:27Z")

</div>

node-red-stop - All node-red processes stop except node-red-log

Stopped node-red-log - all stopped

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a75725eb65d025fcad8250b6bf37bd3a097d46.png)

Don't think it is any of the 'other stuff' causing the problem. Down to NR and it's associated apps.

Let's try node-red --safe - `node-red --safe`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c4747b65d0a0de37df732452c89725848a832cad.png)

node-red-start - All the other 'phantom' processes are running...

EDIT!!! Original ong was in SAFE mode - this one is RUNNING!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/c/ec320adc72538c550e57600ca85b9d2610332000.png)

All screenshots filtered with `node-red`

All looks OK until NR is 'activated', which I would assume is activating node.js

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 14:09 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/28 "2026-05-27T14:09:39Z")

</div>

Nuclear Option is on Standby...

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 14:11 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/29 "2026-05-27T14:11:32Z")

</div>

> [@mudwalker](#):
>
> All looks OK until NR is 'activated', which I would assume is activating node.js

That is when it starts your flows. Almost certainly you have a loop in your flows somewhere. Try stopping mosquitto  
`sudo systemctl stop mosquitto`

If that stops the overload then use MQTTExplorer to find what topic is being continually written to. Start mosquitto again obviously.

If it isn't an MQTT loop then disable flows and see which ones stop the overload.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 14:31 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/30 "2026-05-27T14:31:11Z")

</div>

After `npm_modules` delete and `npm install`

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cba52f2273d2742dce84fc3907f9f144c827216a.png)

sudo systemctl stop mosquitto

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/02c0545f7228f3974addd1cb1ae1894327ebb17a.png)

mosquitto restarted but flow with MQTT IN and MQTT OUT (Single Node only connected to server)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/d/3da53840c0ddc426bfb5287c4e3bae69c6d1046b.png)

Has to be in here - but this was running OK last week! No changes made.

It has to be in here - one of the original diagnoses. Let me go off and review again. I'll come back when fixed!!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 14:38 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/31 "2026-05-27T14:38:26Z")

</div>

Do you mean that stopping and restarting mosquitto fixed it, without any changes to the flow? If so then that means that it is a conditional loop that can be triggered by some event. Wait till it happens again and then use MQTTExplorer to find the topic.

> [@mudwalker](#):
>
> mosquitto restarted but flow with MQTT IN and MQTT OUT (Single Node only connected to server)

Do you mean that you only have those two nodes in your complete set of flows, or that you have disabled everything else?

As a side note the 'out of memory' crash was likely a side effect of the processor overload. Node red was trying to do lots of stuff but could not keep up with events so queues of messages built up on nodes until eventually it ran out of memory and crashed.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 14:51 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/32 "2026-05-27T14:51:43Z")

</div>

Mosquitto STOP - see screenshot with `sudo systemctl stop mosquitto` above it. CPU usage went right down, still 'ghost' processes

Final screenshot shows ONLY MQTT In and MQTT out Nodes connected to server. There is only ONE MQTT In node and ONE MQTT Out node for all of my flows - I have a MQTT Master Out Flow which handles distribution of ALL MQTT messages.

Yup, I figured I was low on Processor Power and/or Memory, but, as I say, this was a stable reliable server until the WiFi Router failed and I 'lost' NR Server due to incorrect DHCP setting in my temporary fix (a far less capable Plusnet Hub One Router). DHCP error fixed (disabled) and all is where it should be in the Network.

Going through MQTT 'Routing' Nodes/Tree now.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 14:55 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/33 "2026-05-27T14:55:15Z")

</div>

> [@mudwalker](#):
>
> There is only ONE MQTT In node and ONE MQTT Out node for all of my flows - I have a MQTT Master Out Flow which handles distribution of ALL MQTT messages.

I am not sure that is good idea.

> [@mudwalker](#):
>
> Yup, I figured I was low on Processor Power and/or Memory,

I haven't seen any evidence of that. You have a conditional loop triggered by some condition. When it happens again use MQTTExplorer to find the culprit.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 15:01 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/34 "2026-05-27T15:01:19Z")

</div>

> [@Colin](#):
>
> I am not sure that is good idea.

I thought that was the bast way, not too many connections to MQTT. I do have Switcg nodes and Junctions I can enable disable various 'branches' that come in to MQTT Out and are distributed from MQTT In. so I can enable/disable sending/distribution of various MQTT Topics

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4a40d8e4aeab3b80419229c5c8ee0750bed4d55e.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 May 2026 15:05 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/35 "2026-05-27T15:05:11Z")

</div>

> [@mudwalker](#):
>
> Don't think it is any of the 'other stuff' causing the problem

Yes, just ticking off the easy to test things.

> [@Colin](#):
>
> > [@mudwalker](#):
> >
> > There is only ONE MQTT In node and ONE MQTT Out node for all of my flows - I have a MQTT Master Out Flow which handles distribution of ALL MQTT messages.
> 
> I am not sure that is good idea.

I don't know that it really makes any difference to be honest.

I use something similar - though I tend to do it at the flow tab level rather than universally. And typically have 2 mqtt-out's, one for retained topics and one for not retained.

But really, everything goes through one set of code and a single loop eventually I think?

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 15:15 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/36 "2026-05-27T15:15:17Z")

</div>

Interesting. The 2 MQTT Out(s) is something I hadn't though of. My understanding is that NR is a flow and so you wouldn't get MQTT In or Out messages colliding, but then I am way down the Tech Chain! I just recall some posts suggesting fewer MQTT or Telegram Connections to reduce problems, so that is what I have done.

I think I have located the Link Out to the MQTT Sender causing the problem. Need to confirm and then find out why!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 15:19 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/37 "2026-05-27T15:19:10Z")

</div>

Enable Debug 35 and exercise all your lights etc. At some point you will likely see the debug become flooded with output.

Since you are subscribing to `#` then every time you output to MQTT you will get it back via the MQTT In node. One of those is not being correctly filtered in the switch and ends up outputing to MQTT again, or perhaps there is more than one topic involved, writing to A comes back via the In node, and causes a write to B, which comes in and causes a write to A again, and so on.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [27 May 2026 15:26 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/38 "2026-05-27T15:26:59Z")

</div>

I will come back with a definitive answer, but I have disabled a Link Node to MQTT OUT and all calms down with the Processes. However, I have done nothing to this particular part of the routine, it doesn't rely on any MQTT Input, just sunrise and sunset times!!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3c059e2a04c67bef9006d2be8927ec72f9ab45e.png)

Investigations ongoing...

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 15:29 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/39 "2026-05-27T15:29:44Z")

</div>

> [@mudwalker](#):
>
> My understanding is that NR is a flow and so you wouldn't get MQTT In or Out messages colliding

You won't, but having two out nodes, one for retained and one for not makes it easy to see from the flow which ones are retained. I generally do the same as Julian, each flow has two (if required) Out nodes configured as described. The topic is passed via msg.topic.

There is no significant overhead in using many in and out nodes as they all use the same mqtt config node so there will still only be one connection to the server.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 May 2026 15:31 UTC](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134/40 "2026-05-27T15:31:00Z")

</div>

Enable debug 35 and you will see the topics being written to.

[Previous page](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134.md?page=1)

[Next page](https://discourse.nodered.org/t/hmmm-node-red-grinds-to-a-halt-and-is-restarting-any-ideas/101134.md?page=3)
