[mythtv-users] Backend Watchdog??

Dave Sherohman esper at sherohman.org
Tue Jan 23 17:21:16 UTC 2007


On Tue, Jan 23, 2007 at 09:47:25AM +1100, Bill Williamson wrote:
> > > It won't handle cases of the backend hanging (which occurs from time
> > > to time), but it does quite nicely handle cases where the backend crashes.
> 
> It should be pretty easy to write a script that uses wget to query the
> backend's http status port to see if it's still alive, or hung.

Where would I look in the docs for how to make such a query?  I don't
think I've ever had my mythbackend die completely, but it will randomly
hang.  (Sometimes it'll be fine for a month or two, other times it hangs
2-3 times in a single day.)  These hangs are detectable in that they
cause any attempts to delete programs from the frontend to hang until they
timeout waiting for the backend to respond (displaying lists of recordings
and playing them works fine, though - I assume the frontend caches that
information?) and they also cause mythweb to similarly hang until timeout.

I've considered a cron script to periodically poll mythweb's status page
and restart the backend if it times out (or, rather, if the returned
page contains an error message caused by a timeout in the connection to
the backend), but never done it because it seems like connecting to the
backend directly would make more sense (as well as avoiding a dependency
on mythweb).

(Note:  If you're thinking about asking me to rebuild with debugging
symbols to locate the cause of my hangs, be aware that I'm still running
0.18.1 from August, 2005.  There's a good chance current versions have
already fixed the cause of my particular problem, so, if I bother to
rebuild, it's going to be a current version, not the same one with
debugging enabled.  Something to periodically verify that the backend
is still there and responding, however, would be good not just for my
hang and Dave Ansell's crash, but also for any future hangs and crashes.)

-- 
I would rather be exposed to the inconvenience attending too much Liberty
than those attending too small degree of it.
  - Thomas Jefferson


More information about the mythtv-users mailing list