Node-red-out-log (large file)

Running Node Red V0.20.8 on a Pi ( buster)

Everything works, but having problem with SD card 'wear out/corruption' issues.
So far we have done this:
1 . Use good 5V, 3A power supply
2. Using Samung EVO + 32 G micro sd card
3. running ram disk using TMPFS per article here.
However we were looking around the .pm2 file and found a large 'node-red-out-log' file 5G.

Any ideas where to look to see why the node-red-out-log is so large?
Here is the screen shot:

Hers is the settings.js file logging sectio ( we just used default settings):

Node-RED shouldn't log too much. Check what the log contains? Possibly there's some repeating error from a custom node that would give you a clue.

Editors might struggle with the file size but you can for example print out the last 100 lines with tail -n 100 node-red-out.log.

Thank you. Been looking into it more.
In our flow we have a repeated polling to request SNMP(using exec node and sending snmp commands) to a connected device. It is polling on per second basis.
Then we are doing a 'global.set' on the returned value.

  1. We disabled that flow and looked the .pm2/logs/node-red-out-log.
    The node-red-out-log now does not increase in size. SO that seems to be the reason.

So now i just don't understand:
why would the SNMP or global.set write to the SD card?
Would have thought that it is written to the RAM.

Have you checked what it prints in the logs? If it looks like normal log data, maybe you should create an issue to the node's maintainer. You didn't specify which node it is BTW.

Hi ,
I made a typing error. We do the SNMP using the EXEC node. So in the EXEC node we are sendin the SNMP get commands.

I was surpised that a EXEC ( sending a SNMP get) or global.set would generate a 'log'

Perhaps you could use instead of all that spawning?

Can you share a sample of what is being written to the log? Just so we can see what is actually happening?

Hi Nick,
Part of problem is that I am kind of learning as I go. But i am narrowing things down.
Here is the .pm2/logs/node-red-out log file

So that looks like Node-RED is stuck in a crashing loop and pm2 is constantly restarting it.

You have a typo in the settings file on line 260.

1 Like

Thank you Nick,

  1. Deleted the settings.js
  2. rebooted so the settings.js is recreated and shown below

So it still says something about the line 260..

i should actually read
Is this the end of the log ?

Are you sure you're looking at new entries in the log file? Or are they the old ones?

Also I have to ask. Why are you using pm2 rather than the systemd service we install? ( that wouldn’t stop it crashing though) but dies log to system log which is a bit more self managing in size.

Hi Nick,

  1. I corrected a bug in one of my 'function' nodes.
  2. Now i look inside the .pm2 /log/node-red-out.log.
    It is now logging the SNMP info, which is expected.

I think , with your assitance making some sense of this now.

Hi thank you for checking.
First of all, i am learning as I go.

Besides the NodeRed, we are running a node Express server to serve up a WEB page for the UI.
We are using Web Page as the "front end" then sending via fetch() to the NodeRed:1880 to handle the API and the controls


  1. Express Server - to host the front end webpage and js
  2. from web page, we send over to the NodeRED:1880 to handle the API and 'backend-server'

PM2- we did for the Front End so the Express server will run on power up.
I think the Node Red, we also ran PM2 so it starts up on power up.

As I said, learning along the way. So any pointers is appreciated.

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