Remote Tvheadend system becomes unresponsive sometimes, what is the best way to deal with that?
Added by Sean Micklem almost 6 years ago
I have a remote system running HTS Tvheadend 4.3-1288~g66d6161 on Ubuntu Server 16.04.5 LTS. Tvheadend was installed using the Apt repository per the instructions at https://tvheadend.org/projects/tvheadend/wiki/AptRepositories . Every so often Tvheadend crashes and becomes unresponsive. I can still ssh into the machine, but Tvheadend appears not to come up and if I try to access the web interface (using a SSH tunnel as I usually do) it will not come up. Rebooting the system makes everything right again.
I am NOT a Linux guru, so I'm hoping there's an easy answer to this. What I'd like to know is whether there is some way to detect whether Tvheadend has crashed and automatically restart it, or if that's difficult or impossible, then is there a way to detect that Tvheadend has crashed and simply reboot the system? I know there probably is a way to do the latter, but my fear is if I do that and for some reason Tvheadend doesn't come back up after the reboot or takes too long, the system might get into a "reboot loop" where it just keeps constantly rebooting, not finding Tvheadend, and rebooting again. I have to think there is way to handle this that does not involve the computing equivalent of using a sledgehammer but as I say I am not a Linux guru so I really don't know what would be the best approach here. The fact that it's a remote system and I can't be there to physically do anything means I really don't want to do anything that will screw it up. So far Tvheadend has never failed to come up after a reboot, but I don't want to just assume that will always be the case. So, what would be my best course of action here?
Thanks in advance for any ideas or assistance!