[mythtv-users] Frequent backend crashing

Jeff Bevis digijock223 at yahoo.com
Sat Aug 18 04:28:42 UTC 2007


Ryan, here is the script info that I used...  (You don't need to put it 
in /etc/rc.d, that was an arbitrary choice of location.  )

Add a line to crontab:

    0-59/5 * * * * root /etc/rc.d/mythcheck

And in the file /etc/rc.d/mythcheck:

=== CUT HERE ===
#!/bin/bash

#
# Check to see if mythbackend has died, and if so, restart it
#

mythlog=/var/log/mythtv/mythbackend.log

service mythbackend status | grep -q running

if (( 0 == $? )); then
        echo 'mythbackend is running'
else
        echo 'mythbackend is stopped'
        echo "BACKEND DEAD - RESTARTING" >> ${mythlog}
        service mythbackend restart
fi

=== CUT HERE ===

That's it.   Any questions, mail me at digijock at gmail.com and let me know!
-Jeff

ryan patterson wrote:
>
>
> On 8/17/07, *Nick Morrott* <knowledgejunkie at gmail.com 
> <mailto:knowledgejunkie at gmail.com>> wrote:
>
>     On 17/08/07, Jeff Bevis <jbevis at 4access-comm.com
>     <mailto:jbevis at 4access-comm.com>> wrote:
>     > Hi,
>     >
>     > I've seen a few threads on backend crash problems, so I thought
>     I'd add
>     > my info to the heap.  I have not been able to diagnose this
>     problem for
>     > some months now, despite quite a bit of hunting through this
>     list.  I
>     > have set up a cron job to periodically check for the dead
>     backend and
>     > restart it within a few minutes.  When this happens the restart
>     script
>     > appends a message "BACKEND DEAD - RESTARTING" to the
>     mythbackend.log so
>     > I know that it has corrected a dead backend situation.  Any
>     ideas/clues
>     > how to test this problem further are greatly appreciated.  It is
>     > probably my #2 biggest myth problem at the moment, and would love to
>     > figure it out.
>
>     Are you sure all MythTV machines/clients on the network are using the
>     same version of the software?
>
>     Are you using the internal MythTV file streaming for access to remote
>     files, or are you storing your recordings (mythbackends) and accessing
>     them (mythfrontends) over NFS or similar (which it looks like with
>     your /mnt/store recording dir?
>
>     > 2007-08-08 09:33:17.402 Unknown file transfer socket: 0
>     > BACKEND DEAD - RESTARTING
>
>     As your crashes all seem to be relating to file transfers between
>     hosts, I would start investigating here.
>
>     --
>     Nick
>
>
> I think I have the same problem on my mythtv setup.  I have a backend 
> (ubuntu 7.10 edgy) and a couple of networked frontends (ubuntu 8.04 
> feisty).  The backend will sometimes crash while watching live TV.  
> When it crashes the backend log looks a lot like what Jeff Bevis 
> posted.  I think it happens when one program ends and another begins.  
> I never use the "watch live TV" function so I have never actually seen 
> it crash.  But my other users see it happen a lot.
>
> Jeff, Could you post your cron script that you wrote?  Right now 
> sometimes my MythTV users will crash the backend and it will sit idle 
> until I get home and restart it.  Having a script that will check and 
> restart the backend every five minuets would be great.
>
>
> -- 
> _____________
> Ryan Patterson
> ------------------------------------------------------------------------
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>   



More information about the mythtv-users mailing list