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. https://www.zdnet.com/article/raspberry-pi-extending-the-life-of-the-sd-card/
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):
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.
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.
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 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
So:
Express Server - to host the front end webpage and js
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.