Node-Red stops working and needs to be restarted

After a few hours, Node-Red stops communicating, and I need to re-start it. Just re-connecting to the web page doesn't fix it. Is there a setting to keep it running?

When I do restart it, it will often change the setpoint I was running prior to losing touch. It changes it to the minimum value I've allowed for the setpoint. Any ideas of how to get it to pick up where it left off? I'm thinking I may need to set up some sort of wake-up value subscription to have it re-initialize.

Thanks in advance.

Tell us more about your system. Hardware, OS, node red version, nodejs version.

What do you mean by 'stops communicating`.

Stop node red and start it again in a command window and post the full startup log here.

New Windows 11 computer up to date. Looks like everything you are asking for is in the starup log.

Stops communicating means the Dashboard either stops updating or goes blank and so does the Node-Red Flow page. Sometimes closing the web pages and re-starting them fixes it, other times I need to close the Node-Red command window and restart it.

Are you using task scheduler to start it?

I ask as scheduled tasks by default are setup to terminate - if they continue to run without an exit code.
you can change these settings on the task.

may not be your issue - but Just a thought

No, I start it manually and just let it run. I am not familiar with task scheduler. I am very new at this.

I think there have been other reports of command window processing just stopping like this, under Windows, with no obvious reason. I believe the solution is to set it up to run automatically as described in the docs. Running on Windows : Node-RED

I use Linux so can't help much more.

Thanks @Colin ! I set it and, now we will see.

If it hangs again, look in System Monitor to see if anything is using up all the processor time.

I left it run all night and in the morning both the dashboard and node red had a "Not enough memory" message on both and both pages were blank. This is a Win 11 system.

Show us the output in the log when that happens. Include a dozen lines before it fails. Copy/paste the text here please, not screenshot.

Are you using charts on the dashboard? If so then at what rate are you updating them, how many charts and lines, and over what timescale are the charts showing the data?

Not sure I have a log file. Nothing showing up in the console. If I shut down Node-Red and start it back up at a later time, everything looks fine.

Where do I find the log, or what do I need to do to configure it so I have one?

Thanks for helping! @Colin

Ah, you are using windows so I don't know. I mean the continuation of the image you posted earlier.

Copy/paste it from the command window when it happens.

Also you didn't answer:

update once a second, chart for temperature on the incubator was for 2 days. Maybe that would run it out of memory? I also have a temperature gauge.

There are no errors posted there.

There would have been a message in the terminal if node-red had run out of memory, so it isn't node-red that is short of memory.

That is 172800 points on the chart that have to be shuffled down by the browser every second. I suspect it is the browser that is in trouble. There is no point having more than a few hundred points across a chart. I suggest either sampling more slowly (maybe once every 5 minutes) or add a Delay node on the chart input set to Rate Limit to once every 5 minutes and to discard intermediate points.

With an incubator is is important to have at least a day of history, but I agree that a sample every few minutes would be enough.

If you need a higher sample rate, or need to be able to zoom in and out and look back over days or weeks then I suggest using something like Influxdb for storing the data and Grafana for displaying it.

1 Like

Thanks! I'll check it out.

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