Recently I have been getting my Raspberry Pi's that runs this website and other services (Media, Alexa Skills, Email, etc) and backups to run reliably. That is, making them work for days and weeks without crashing or freezing up and requiring a power cycle to get them back again.
Until now, my Raspberry Pi's have been freezing and requiring hard resets or usb disks keep disconnecting which means backups fails and access to SMB shares fail.
To overcome this I set about finding solutions.
I started monitoring my services - I used UptimeRobot to monitor when my services are up and down, getting the time when services are failing, and checking the logs to determine what is going on.
I use the WatchDog service to restart the Raspberry Pi when it freezes.
Check power usage - I have a number of RPIs that have USB disks connected. One is and SSD and that works fine. 2 other RPIs have USB disks. One uses a PiDrive Cable (https://uk.pi-supply.com/products/wd-pidrive-cable) and that drive is ok. The last one uses a USB to SATA cable and drawing power via the USB port - This one keeps dropping connection to the disk when under load. I moved disks around so that my main RPI server was using the PiDrive cable which made server much more reliable.
Another thing I have found is that for my setup, the avahi-daemon service was causing my RPIs to fail. Removing this avahi-daemon from my RPIs made my RPIs much more stable.
My RPIs are all now working much more reliably and my personal services are running sweet. So now I can move on to other things...