I run mine in docker containers with a max mem of 1gb.
My production node-red container uses about 400 MB memory.
My Dev node-red container uses about 200 MB (no dashboards/graphs - those take a lot of memory).
I run mine in docker containers with a max mem of 1gb.
My production node-red container uses about 400 MB memory.
My Dev node-red container uses about 200 MB (no dashboards/graphs - those take a lot of memory).
I have 4G memory on the PI.
I am wondering the difference from starting from commandline with the max-old-space-size vs running as a service.
https://nodered.org/docs/getting-started/raspberrypi
I am running it as a service.. with this setting:
NODE_OPTIONS=--max_old_space_size=512
Does that go in settings.js?
No in the "nodered.service" which for me is located here:
/usr/lib/systemd/system/nodered.service
Wait the pi can run out of memory for node red
that was the error in the log.
Sure. It is a computer running an app.... If node-red (or a node in node-red) has a memory leak, or is configured with gigantic memory hogging nodes (graphs with 50000 data points as a crazy example), then it can run out of memory just like any other computer.
What else are you running on the PI? MQTT? anything else?
I'm running the Ubuntu server 64 bit version.. do you see anything odd running "top"?
My pi has one purpose in life and that is to run node-red. I have 2 graphs, 2 gauges, and 2 switches in the ui. That's it. I am barely pi literate, so I am not messing with it. in fact, I am at a loss as to why the service won't run now, but if I run node red from command line it works...
Dunno that sounds strange. Out of HD space maybe?
I think I am good there
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 3.7G 25G 14% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 209M 1.8G 11% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 53M 200M 21% /boot
tmpfs 391M 0 391M 0% /run/user/1000
What you are showing here is storage utilization, not memory. Use the "top" tool to see how much memory is available, free, used by each process, etc.
Out of HD space was the question I was answering, but here is the top tool right now, of course I do not have it from when node-red stopped.
I'm not seeing a problem. @erktrek answered your question about applying your configuration and both memory and storage have plenty of free space so I don't know what you mean here.
You might consider running your Pi headless, so you don't have the overhead of running X (and whatever else ...).
Good point but he's got plenty of space even with X.
Yup. I don't see that there is a problem to solve? Unless there is an npm/js setting that is set wonky. But I have never had to go there in any of my bazillion node-red installs.
The error I saw in the node-red console window was something to the effect of out of memory.
Ok, most likely a node.js heap memory error. Depending on what version of node.js you are using, there are ways to change that setting.