Node Red crashes every 30 minutes

Hello everyone,
I have a problem with my Node Red software. Namely, the system resets itself every 30 minutes.
To check what the problem is, I looked at the logs. But these do not give any information about the error.

I then opened the task manager and waited for the reset. This shows an extreme load of red.js at this moment. I suspect that at that moment there is not enough memory available for the program and therefore it kills itself.

So far, unfortunately, I can not explain where the error lies. Also related errors in the forum could not help me because I do not see an explicit node which triggers the error.

Therefore to you the question. Can you explain what it is that he always has this memory requirement after 30 minutes? Are there any automatic saving processes running in the background?

When I run node red in safe mode no crashes are generated.

I use mostly MQTT, multiple function nodes and 3 InfluxDB nodes to store the data. Furthermore still tasmota and several ui nodes.

My current node.js verison is v16.16.0

Thanks in advance for your help!

It may help a lot of people if you actually post the log and not a screenshot of it.

copy the text to the clipboard then paste it here.

BEFORE pasting it:
Press the </> button. You will see this on the screen.

type or paste code here

And paste the text where the type or paste code here is.

Also after trying to read the log:
You seem to have a 30 minute restart job running somewhere.
You may need to elaborate on what is happening on the machine.

Thanks for your answer!

I will replace the screenshots tonight. I am currently not near the system.

Yes, that is exactly what I suspect. However, I haven't made any changes to Node Red in weeks. Also no other features or updates for the Raspberry PI have been installed.

No problems.

It is I did notice something about scheduled restart in/on the screen shot.

(oh, something else)

Ok, it is a RasPi.
What is it (the node-red side of things) doing? In the bigger picture.
How many tabs do you have in the whole scheme of things?
And sorry but have you scanned all of them and made sure there aren't any sneaky nodes hiding and causing this to happen?

multiple function nodes and 3 InfluxDB nodes to store the data

and what are those function nodes doing ? and how often ? Do you have loops in your flows ?

To me, that says that something external sent a kill signal to the node-red process.

Seems to have plenty of memory but the CPU load is very high and you have multiple threads running which also implies a heavy load within your flows or maybe a node that is calling out of node-red and getting too many rapid calls (e.g. many messages kicking off an exec node).

Node-RED is a node.js app - Node.js uses a "Garbage Collection" periodic process to recover unused application memory. You are starting node-red with --max-old-space which, given you are using a 4GB RAM Pi, is not necessary, it is far better to take that off and let Node.js manage its own memory.

Thanks for your answer :slight_smile: There are about 15 MQTT nodes. Data is retrieved from sensors (3) every 5 minutes and written to an InfluxDB.
Functions are used to change data types or to pass data only for desired input variables. They do not execute any code longer than 5 lines (number about 20).
There are 2 loops that are triggered every 5 hours and run for a maximum of 5-20 minutes.
Other than that I use 2 bigtimer nodes and 2 tasmota for 2 sockets.

But I will give you a more detailed list tonight

What amazes me is that the system ran stable for weeks after the last change. There must be a memory full somewhere here or?

Thanks for your answer!
So should I disable node by node and see how it affects the CPU load?
If Node.js but after a certain time recovered I do not understand why this error occurs only now. Then it should have happened right after the last change.

Okay then can I just comment out the --max-old-space in the node config file?

Loops are normally the reason for CPU issues.

Can you show up what you are doing?

1 Like

Yes, get rid of it.

You might simply be reaching a threshold where you are triggering things faster.

You'll need to be a bit more thoughtful than that. I'd firstly stop inputs to flows one-by-one. Then if a flow is identified as a problem, try enabling it but limiting the throughput.

My guess would be that those are hogging the processor for some reason. It could be something else in node red doing that though.

Hello together,
sorry for my late response.

Briefly for information. The system has been stable again for 2 days now. I had unused Blynk nodes in the system that I deleted and I updated the InfluxDB version. Then I restarted the system and it was stable. However, the Tasmota nodes have been offline since then, which I can't explain.

Here is an overview of the nodes I use:

In addition, I seem to have 49 function nodes in the system. These are only used to eliminate time colons or as an if condition for switching.

Here are 2 more systems that are called cyclically. However, nothing else runs as long as the logical AND node does not switch through.

The first system switches on a socket every 10 hours and measures the current with a time delay; if this falls below a certain value, the socket is switched off (charging monitoring of a laptop).

The second system ensures that an LED matrix with the current time is switched on when switching via the UI. The current time is then sent to the matrix every 6 seconds. However, the LED matrix was not switched on at the time of the crash.

What are these nodes? Are the Home Assistant?

Thats a Tasmota sensor Node

Why do you need a special node when Tasmota outputs to MQTT? Try removing those nodes and use MQTT instead.


Good Morning,

I have now replaced the special Tasmota node with an MQTT node. But what are you hoping for? Do you think the problem is with the Tasmota node?

Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.
Arthur Conan Doyle

It is more about eliminating things that are over complex. I don't know that the tasmota node is a problem but it is a complexity you don't need so worth eliminating up front. A quick win is all.


Yes that sounds logical in any case

Just chipping in.

And I don't have any grudges with the person who made the tasmota node.

But I've not have much luck with it when I used it way back when.

Using MQTT nodes may be a good find to help find out where the problem is.


Just another bit of information, I use the NR MQTT nodes with Tasmota devices and have never seen a problem.

I always feel that adding nodes to talk a specific protocol when NR is quite capable of doing the same job in a 'standard' mode adds a layer that is not required and adds another point of possible failure. But then, that is me!