I had an issue earlier this week that you all helped solve (Thank you!). I have another, not sure if anyone has advice how to solve it.
Seemingly randomly, the "connection lost" error will show up on the dashboard, it freezes up, and if I refresh, it is unable to reconnect, the browser just spins indefinitely. This occurs on all browsers. The node red editor locks up too.
Interestingly, node red still appears to be running in the background, and nothing shows up in the log. In addition, the only way to solve the problem is to restart the device. Stopping and starting node-red does not solve the problem. I am still able to interact with the device over ssh, so it seems it must be specific to port 1880? I do not know enough about networking to troubleshoot this.
The device running the node red instance is a raspberry pi 4 with raspbian. I am connecting remotely using zerotier, and my colleague who is on the same network is also having the same issue. We are using the dashboard as a gui to run an executable and to display data on the dashboard. New data gets sent every 10s, and some of the data is loaded in from a file, while the rest is sent using mqtt. The gui also sends messages to the program using mqtt as well.
Does anyone have suggestions on how to troubleshoot this issue?
OK, it lost connection again, and I stopped mosquitto. I waited 10 min, but nothing changed. After running node-red-stop, if I wait several minutes as you suggested, and then start it back up, I am able to connect again. Also, this is a screenshot from htop, showing node-red taking up 100% of the cpu (after I had stopped it).
Thank you all for your help. I had a very subtle bug in a function I was using to set the range on a plot based on incoming values. It was under certain conditions, causing an infinite loop inside the function and locking up the browser. I was unaware that node-red wasn't stopping right away, so I didn't think to troubleshoot my flows. A note for anyone in a similar situation, if you select a group of nodes and press ctrl-shift-p, you can mass disable nodes, which makes for a fairly quick method to isolate the problem.