First, I original posted this issue on the Raspberry forum thinking I was looking at problem with Raspberry OS. But as continue testing I wondering if issue was with node-red, So here is my problem.
First little on my configuration, so individuals will understand now got to were I am. I have two raspberry's....
Raspberry1 (crashing) Node-red, Mosquitto client.... node-red running home alarm systems (garage door opener/sensors, cameras, motion sensor etc.)
Raspberry2 Node-red, Mosquitto Broker.... node-red is running integration of stereo, tv, media server etc.
Both Raspberry's running node-red version 3.0.2, Raspberry OS version 10(Buster)
To help track when then Raspberry1 crashes I added script in crontab to warn me when ever the system reboots and script to log Raspberry temperatures and check for throttling... System is running around 61C but no throttling is occurring.
I then continue testing node-red flows on Raspberry2.... Total unexpectedly every time I request node-red to deploy changes on Raspberry2.... Raspberry1 would crash.....
The only thing in common between the two Raspberry's is the Mosquitto broker.....
But why would Raspberry2 cause Raspberry1 to crash????
Run, in a command window, node-red-log
Which will show you the node red log. Leave that window open and make node red crash. Hopefully the log will show something useful.
I have now realised that you are saying that the pi reboots.
If that is the case then you can look in /var/log/syslog after it reboots and scroll back to the start of the reboot and you should see why it rebooted.
[Edit] Are you running the PIs off good quality power supplies?
raspberry1 kernel: [ 0.000000] Booting Linux on physical CPU 0x0
some time they will be consecutive messages, other times not. On crashes with messages separating the two messages listed above, number of messages varies depending on each individual crashes. I attach section from one crash... I am hoping another set of eyes will see something...
The flow in question was designed to toggle a power relay for raspberry 1, if the raspberry 1 stopped responding. For some reason the flow is now sending toggle command on every deploy command.
As some one had suggested, I was beginning to think the OS on the SD card was corrupted in some way...