LinHES Forums
http://forum.linhes.org/

Suggestion: detect mythbackend failure and restart it.
http://forum.linhes.org/viewtopic.php?f=6&t=2366
Page 1 of 1

Author:  Mnemic [ Thu Sep 09, 2004 8:21 am ]
Post subject:  Suggestion: detect mythbackend failure and restart it.

I have a base install going, but thought I'd offer a tip since I don't see it implemented just yet.

For some reason that I'm looking into, mythbackend will die, and the front end just starts giving errors about unable to connect to backend.

restarting mythbackend has fixed this issue, but I though I would suggest a way to auto-restart the backend and/or frontend in case either of them dies during use.

Just to increase the User acceptability level for the non-technical users of the system.

Author:  Xsecrets [ Thu Sep 09, 2004 8:32 am ]
Post subject: 

oh so you are requesting a way to restart them, not suggesting a way to restart them.

Actually I don't think they should be restarted automatically. The front or backend failing is a sign that something is not right. If you just automatically restart it, then you don't realize there is a problem and the new user starts to think that mythtv and knoppmyth suck, because every few recordings aren't right.

If things are running right the frontend and backend should never stop. My frontend and backend ran for about 9 days straight that I know of only cause I decided to check how long the box had been up just before I started tinkering again.

Author:  randomhtpcguy [ Sun Jul 16, 2006 11:42 am ]
Post subject: 

good suggestion. maybe a log of the error could be emailed to the user on the restart. However, it really sucks to go on vacation for a week and realize that your master backend stopped on the second day and you missed all the recordings.

Author:  randomhtpcguy [ Wed Jul 19, 2006 2:41 pm ]
Post subject: 

http://www.mythtv.org/wiki/index.php/St ... ing_How_To

A little searching and ...

Monit seems to work pretty well for mythbackend after i tried it for a day.
It has a status webpage that clearly presents what it is watching and how long it has been running.

If you need to run setup you could go to the monit webpage and click the stop button for the mythbackend and then run setup so monit won't restart it automatically.

I'm having a little trouble getting it to monitor mythfrontend because unlike the backend there is no pidfile like /var/run/myth/myth-backend.pid
for mythfrontend. I think mythfrontend is invoked with knoppmyth-run script instead of an /etc/init.d/mythfrontend script and doesn't have the pid file.

Obviously i'm not a guru and couldn't get this working quickly.

cool thing is that monit emails you the log when things it monitors crash and it restarts them.

It would be cool for myth to use monit and then pop-up a transparent alert that the backend was restarted. Really its usually obvious when i can't reach the database, but when my slave backend or something goes down and the recording device is "unavailable" i often am unaware that it is missing recordings until it is too late. that is why i like the idea of using monit and receiving the log files to my email.

I agree with people's warnings about enabling us to ignore problems but lets not be a slave to a hobby but rather do maintenance on our own time. If monit can keep mythtv going until we have free time then that is usually better in my opinion.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/