I just set up a hardware watchdog on YunoHost to monitor my connectivity using the watchdog systemd service. If I can't ping 8.8.8.8 for 30 minutes, it'll trigger a reboot.

I've been having issues where my RPi4 server suddenly lost the internet connection... I disabled EEE, which hopefully fixed that, but having some extra security like this probably won't hurt.

#YunoHost #SelfHosted #Linux #RaspberryPi #SystemD

@bammerlaan it's using a hammer for a fly. check another ip to be sure and check you can access your lan. Check your logs, your ressource with sar. Dont reboot like it's magic, best to investigate and understand. You can reboot everyday if you want but that's for other reason.
Use this workaround for a short time and fix at the source

@Quentin_ctrL Oh, thanks! Well, I did check the logs, and there's nothing really there... As far as I could tell. But some googling did tell me these kinds of issues could stem from the mentioned EEE thing, so that's what I'm trying first.

The watchdog is more a redundancy thing, I figured it couldn't hurt to have something like that running.

Don't misunderstand: this isn't some script that reboots the server every 30 minutes, only if there's no internet connection or some hardware failure.

@bammerlaan use journalctl and filter by time , severity , unit. Check the load of the rpi ? Maybe the hardware is hot or another hardware issue. Remember if the issue starts after updates.
Can you tell how long before you have network issue ?
In your installed apps, try to figure out which could be related, eventually restart the service related with a timer unit.

@Quentin_ctrL As far as I can tell, the hardware doesn't seem to be overheating... But I did follow your advice to set up sar! Got it running now, so if I do have another problem with the internet connection, I should be able to garner some more information now.

I also set up a systemd service to send me an email if a reboot happened, ideally that will also help me pinpoint when the network issues happen.

For now I'm crossing my fingers that the EEE fix actually worked, though 🤞