I have installation on RaspberryPi.
Node-red, DB.
Everithing is working fine.
after several hours I cannot login to web. not flow space nor user pages are available.
But when I check data in DB they are growing. Node-red and its flow are doing the job that I programed.
Only solution si tu kill proces. or restart node-red or all Raspberry.
Thank everything is working for several hours.
Hi Yes I am accessing from different PC with port 1880.
and As I wrote everithing is working find.
After sever hours it start to reply slowly and slowlier. every refresh is worse
nutil it stops replying.
Node red is using 153% of a cpu core, which means that it is probably stuck in a loop of some sort, or just doing more and more work as time goes on.
How much cpu is it using initially? Does the percentage increase slowly over the hour that it takes to clog up?
Stop node-red and start it again in a command window. If you installed using the recommended method then you can do that using node-red-stop node-red-start
then copy/paste the startup log that you see. Copy/paste please, not screenshot.
I did monitor it for several minutes nos and ti jump between 90-130% CPU
I will check it later for this value and report back.
I didi try to restart as You suggested.
karel@raspberrypi:~ $ node-red-stop
Stop Node-RED
Use node-red-start to start Node-RED again
karel@raspberrypi:~ $ node-red-start
Start Node-RED
Once Node-RED has started, point a browser at h ttp://10.0.0.10:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
Starting as a systemd service.
27 Nov 21:47:33 - [info]
Welcome to Node-RED
27 Nov 21:47:33 - [info] Node-RED version: v4.0.5
27 Nov 21:47:33 - [info] Node.js version: v20.18.0
27 Nov 21:47:33 - [info] Linux 6.6.51+rpt-rpi-v8 arm64 LE
27 Nov 21:47:34 - [info] Loading palette nodes
27 Nov 21:47:38 - [info] Dashboard version 3.6.5 started at /ui
27 Nov 21:47:39 - [info] node-red-contrib-home-assistant-websocket v0.74.2 nodes initialized
27 Nov 21:47:39 - [info] Settings file : /home/karel/.node-red/settings.js
27 Nov 21:47:39 - [info] Context store : 'default' [module=memory]
27 Nov 21:47:39 - [info] User directory : /home/karel/.node-red
27 Nov 21:47:39 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 Nov 21:47:39 - [info] Flows file : /home/karel/.node-red/flows.json
27 Nov 21:47:39 - [error] Unable to listen on h ttps://127.0.0.1:1880/
27 Nov 21:47:39 - [error] Error: port in use
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Consumed 8.638s CPU time.
Unfortunately. I cannot start it from terminal because I have it setup as a service and it always start atomaticali after stop. That is why Error port in user. because it is already started.
karel@raspberrypi:~ $ sudo lsof -i :1880
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node-red 2289 karel 19u IPv4 24359 0t0 TCP *:1880 (LISTEN)
Thare fore I don't know what is happening after start.
I didi try to setup log file. but in documentation is written that login to file is not supported. Therefore I don't have any more log informations
It is already clogged up then. Typically node red should only be using a few percent, maybe up to 10 or 20 if it is very busy.
node-red-stop should stop it running as a service, and it will not restart. However, if it is already clogged up it may take some time to stop. Run node-red-stop and then monitor top until node-red stops. Then restart it.
Run sudo systemctl disable nodered
and reboot. Node red should not restart. Check that it is not running. Then you can start it with node-red-start.
You can disable individual flow tabs. Double click on the tab and there is an enable/disable button bottom left. That may be a good way of finding where the problem lies.
You can try disabling a bunch of flows and seeing if the problem still occurs.
It's easier to first disable any which don't have too many connections from one flow to another.
You should also look for any loops, either directly in the wires between nodes, or loops with external services. eg MQTT.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2289 karel 20 0 10.3g 346148 48384 R 55.6 8.9 80:39.67 node-red
810 mysql 20 0 2282716 124316 23168 S 23.5 3.2 43:32.55 mariadbd
535 avahi 20 0 7516 3072 2688 S 0.3 0.1 0:39.79 avahi-
Only way that I can kill it si by
karel@raspberrypi:~ $ sudo lsof -i :1880
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node-red 2289 karel 19u IPv4 24359 0t0 TCP *:1880 (LISTEN)
^[[A^[[Anode-red 2289 karel 36u IPv4 31195 0t0 TCP 10.0.0.10:1880->86.48.15.77:10180 (ESTABLISHED)
karel@raspberrypi:~ $ kill -9 2289
but that after 15s node-red starts appearing in top command
So it did stop but started automatically.
Great it did help to kill and not start node-red again. super. Now I was able to start it in console
I didi diesable all flow and I am starting slow with one by one flows.
About install I did flolow installation instruction on this pages. using command line.
Starting as a systemd service.
27 Nov 22:29:15 - [info]
Welcome to Node-RED
===================
27 Nov 22:29:15 - [info] Node-RED version: v4.0.5
27 Nov 22:29:15 - [info] Node.js version: v20.18.0
27 Nov 22:29:15 - [info] Linux 6.6.51+rpt-rpi-v8 arm64 LE
27 Nov 22:29:16 - [info] Loading palette nodes
27 Nov 22:29:19 - [info] Dashboard version 3.6.5 started at /ui
27 Nov 22:29:20 - [info] node-red-contrib-home-assistant-websocket v0.74.2 nodes initialized
27 Nov 22:29:20 - [info] Settings file : /home/karel/.node-red/settings.js
27 Nov 22:29:20 - [info] Context store : 'default' [module=memory]
27 Nov 22:29:20 - [info] User directory : /home/karel/.node-red
27 Nov 22:29:20 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 Nov 22:29:20 - [info] Flows file : /home/karel/.node-red/flows.json
27 Nov 22:29:20 - [info] Server now running at h ttps://127.0.0.1:1880/
27 Nov 22:29:20 - [info] Starting flows
27 Nov 22:29:20 - [info] [ui-base:My Dashboard] Node-RED Dashboard 2.0 (v1.19.1) started at /dashboard
27 Nov 22:29:20 - [info] [ui-base:My Dashboard] Created socket. io server bound to Node-RED port at path /dashboard/socket.io
27 Nov 22:29:21 - [info] Started flows
27 Nov 22:29:21 - [info] [tasmota-mqtt-broker:mqttOnPi] Connected to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:21 - [error] [mysql:4f73c73850fdbfd2] Database not connected
27 Nov 22:29:21 - [error] [mysql:324f4d61de69e59e] Database not connected
27 Nov 22:29:21 - [error] [mysql:76132c62b576d619] Database not connected
27 Nov 22:29:21 - [error] [mysql:fe5aeed1a2226ee5] Database not connected
27 Nov 22:29:21 - [error] [mysql:22629cdfc52ca2fd] Database not connected
27 Nov 22:29:21 - [error] [mysql:637535bc7817ce06] Database not connected
27 Nov 22:29:21 - [error] [mysql:4e834fb0f6c54f9c] Database not connected
27 Nov 22:29:21 - [error] [mysql:de0fc93e74e67672] Database not connected
27 Nov 22:29:21 - [error] [mysql:e8a2bc7ea34d7271] Database not connected
27 Nov 22:29:21 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:21 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:36 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:36 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883