# Node-Red not reachable after irregular time intervals

**URL:** <https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689>\
**Category:** General\
**Created:** [15 January 2022 08:39 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689 "2022-01-15T08:39:32Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Crashy77](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Crashy77](https://discourse.nodered.org/u/Crashy77)\
**Post date:** [16 January 2022 09:07 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/21 "2022-01-16T09:07:45Z")

</div>

The Pi and SD card were totally new and nothing was installed before.  
I can´t believe, that it should be corrupt, but ok, I will do that.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 January 2022 09:34 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/22 "2022-01-16T09:34:10Z")

</div>

So what is your flow doing? Can you provide a export of it?

---

<div class="post-metadata">

**Author:** ![Crashy77](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Crashy77](https://discourse.nodered.org/u/Crashy77)\
**Post date:** [16 January 2022 11:28 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/23 "2022-01-16T11:28:39Z")

</div>

First thread is an attachment

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 January 2022 12:27 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/24 "2022-01-16T12:27:25Z")

</div>

One thing I notice is that your `mqtt-in' node () links to 17 seperate `switch` nodes all testing msg.topic. This means that each time a mqtt msg arrives, NR has to clone the msg 17 times and only one will be passed on.

Why not have one `switch` node check the 17 conditions and pass it on to the appropriate function node?

---

<div class="post-metadata">

**Author:** ![Crashy77](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Crashy77](https://discourse.nodered.org/u/Crashy77)\
**Post date:** [16 January 2022 12:46 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/25 "2022-01-16T12:46:06Z")

</div>

In newer systems I´m doing this.  
This version was the first on a Pi Zero and the first for my heatpump.  
It´s not finished yet.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 January 2022 14:12 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/26 "2022-01-16T14:12:29Z")

</div>

Sorry but I;m unclear with your last response

> [@Crashy77](#):
>
> In newer systems I´m doing this.

doing what? forking the mqtt-in to 17 seperate switch nodes or using one switch node?

> [@Crashy77](#):
>
> This version was the first on a Pi Zero and the first for my heatpump.  
> It´s not finished yet.

it's not finished because something is causing the Pi to stop working or not finished because because you have more code to add?

I would be attaching a `change` node (setting msg.debug with a unique identifier) to a debug node (set to send the msg to the log) at each point where the flow can be triggered trigger. With that, you should be able to see what was happening just before the `PiZero Node-RED[3778]: internal/fs/rimraf.js:251` issue starts up. If you add an 'exec' node with the command `free` between the `change` and `debug` nodes, you could also watch memory usage.

---

<div class="post-metadata">

**Author:** ![Crashy77](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Crashy77](https://discourse.nodered.org/u/Crashy77)\
**Post date:** [16 January 2022 15:12 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/27 "2022-01-16T15:12:51Z")

</div>

In newer systems I´m using one switch node.  
And it´s not finished, because maybe I´ve more to add.  
And the memory usage is never more than 20%.

---

<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:** [16 January 2022 15:45 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/28 "2022-01-16T15:45:55Z")

</div>

@zenofmud can you see any way that the code could contain that shown unless there was corruption of that file? Particularly as the error appears before the welcome message for node-red, at least it seems that way looking at post 3.

On the other hand, if a reboot fixes it then perhaps it is the code cached in memory that is corrupted, but that should not be able to happen (except by h/w failure).

---

<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:** [16 January 2022 15:48 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/29 "2022-01-16T15:48:54Z")

</div>

@Crashy77 you said it happened on two different Pis, did you use the same SD card? If so then I still suspect that.

---

<div class="post-metadata">

**Author:** ![Crashy77](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@Crashy77](https://discourse.nodered.org/u/Crashy77)\
**Post date:** [16 January 2022 16:34 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/30 "2022-01-16T16:34:47Z")

</div>

Yes, I´ve test it on a Pi Zero1 and Zero2. But it was the same SD card.  
But now the installation is new and we´ll see.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 March 2022 16:35 UTC](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689/31 "2022-03-17T16:35:25Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/node-red-not-reachable-after-irregular-time-intervals/56689.md?page=1)
