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

MythTV 0.17 dies sometimes with MythWeb?
http://forums.linhes.org/viewtopic.php?f=17&t=4153
Page 1 of 1

Author:  jared [ Tue Apr 12, 2005 5:58 pm ]
Post subject:  MythTV 0.17 dies sometimes with MythWeb?

Hi all,

I don't recall 0.16 MythTV ever dying, but the 0.17 version is crashing on me fairly frequently (several times a day). It seems to occor when I'm clicking through the MythWeb interface.

Two questions: First, is this a known issue?

Second, does anyone have a script that restarts MythTV as needed when it "goes away".

TIA

Jared

Author:  tjc [ Tue Apr 12, 2005 8:47 pm ]
Post subject: 

Do you mean something like this?
Code:
/etc/init.d/apache restart

Or something excessively clever?

Author:  jared [ Tue Apr 12, 2005 9:09 pm ]
Post subject: 

Sounds like I was hoping for excessively clever.

You missed the "as needed" part... I guess should've been explicit.

How about a script that from time to (every 1 or 5 minutes or so?) looks for a mythbackend process. If it can't find on, it starts one. A restarter daemon?

The reason for this is to detect that myth has died and then restart it automatically. I'd really prefer it not be down all day (or weekend if I'm out of town) before I notice my shows are being recorded and then manually run the script.

Author:  tjc [ Tue Apr 12, 2005 9:40 pm ]
Post subject: 

jared wrote:
You missed the "as needed" part... I guess should've been explicit.

Didn't miss it... You can do that as needed. ;-)
jared wrote:
How about a script that from time to (every 1 or 5 minutes or so?) looks for a mythbackend process. If it can't find on, it starts one. A restarter daemon?

You REALLY don't want to do that blindly every X minutes. It would be ... uhm ... bad and you wouldn't like the results. Even trying to detect that the process isn't running and restarting it can lead to a race condition.
jared wrote:
The reason for this is to detect that myth has died and then restart it automatically. I'd really prefer it not be down all day (or weekend if I'm out of town) before I notice my shows are being recorded and then manually run the script.

I don't know where to start explaining the options, tradtional solutions (e.g. - inittab "respawn" entries) and the various problems with them. Daemons aren't supposed to fall over, if they do it usually indicates a potentially serious problem that you need to fix. Restarting them automatically can lead to a variety of problems. I don't think I've ever seen the Mythweb server die despite having about every other possible problem with my KnoppMyth box. Return screwy results yes, die no. I'd say your first priority should be to play Kepler and figure out what's really happening rather than adding a a never ending series of epicyles when all you need is one elipse.

Author:  jared [ Wed Apr 13, 2005 5:26 am ]
Post subject: 

We're talking past each other.

1) I don't to do it manually as needed. That's silly.

2) I don't want to have it done blindly every 10 minutes. That's also silly.

3) I want to parse the ps aux list, see if it's still running, then run the startup script ~if~ it's needed. but I want that all done automatically so I don't have to log into the machine every 1/2 hour to make sure it's still running.

I've seen other scripts around that do this sort of thing before, so I'll go looking around and see what I can find. I was hoping someone who hangs out here might have had to do this and had one laying around.

I realize that it indicates a problem that needs to be fixed, but I don't have time to code dive right now... that's why I posted here.

Author:  aovermy [ Wed Apr 13, 2005 6:23 am ]
Post subject: 

I've noticed occasional "silent" resets of my myth backend. By silent I mean the daemon dies but there's no indication of anything bad in the myth logs. By occasional, I mean once every month or so. I use monit.

Relevant entries from my /etc/monit/monitrc entries include:

check process mythbackend with pidfile /var/run/mythtv/mythbackend.pid
start program = "/etc/init.d/mythtv-backend start"
stop program = "/etc/init.d/mythtv-backend stop"
if 2 restarts within 3 cycles then timeout
group server

I've seen it restart the backend once. A nice feature is the ability to use the web to check on your monitored daemons.

Amy

Author:  aovermy [ Wed Apr 13, 2005 6:25 am ]
Post subject: 

Too early, I mean to say I use monit and the relevant entries are:

I just did apt-get install monit then editted the config file.

Amy

Author:  gr8nash [ Wed Apr 13, 2005 8:57 am ]
Post subject: 

basicly what tjc is saying is that you need to spend more energy on fix the problem then building a bandaid. Mythbackend shouldnt die like that.. and if ever, VERY rarely. so somthing is wrong with your setup that can be fixed. I would fix that..

Author:  aovermy [ Wed Apr 13, 2005 10:12 am ]
Post subject: 

I would tend to agree if it happened more frequently, but in my case, we're talking once a month with a lot of recording activity going on.

Author:  jared [ Wed Apr 13, 2005 1:22 pm ]
Post subject: 

My setup is dying once or twice a day, so there probably is something bad going on, but I'm not sure how to debug. The logs were clean the last time I checked them (I'll look again this evening).

Last night, I checked things about 11:30, this morning it was dead again. I restarted it and went to work. I'll check it when I get home.

aovermy, thanks for the useful info! I'll set that up tonight!

If anyone has any debugging hints for silent Myth backend deaths, let me know and I'll be glad to try them.

Author:  aovermy [ Wed Apr 13, 2005 3:29 pm ]
Post subject: 

once or twice a night does sound a little frequent though.

But it worked fine under 0.16?

Did you upgrade via debs or rpms or via a partition overwrite with CD?

You said, it seems to happen in mythweb, what are you clicking on in mythweb? Is it when you try to schedule a program, or when you try to find out it's status, or...

does anything spit out in /var/log/messages or /var/log/syslog when mythbackend crashes?

As I stated, my system does silently die from time to time, but it has not been frequent enough for me to investigate fully. The other thing is, I run CVS (updated every so often when it looks like a lull has formed on the dev list so I can reasonably be sure it'll work); so I expect a certain threshold of instability.

Amy

Author:  gr8nash [ Wed Apr 13, 2005 4:54 pm ]
Post subject: 

one thing i have head many complaints about crashing mythbackend is mythcomercialflagging. try turning it off for a bit and see if it stops crashing. =) just a thought

Author:  jared [ Wed Apr 13, 2005 5:40 pm ]
Post subject: 

Thanks for the tips!

Quote:
But it worked fine under 0.16?


Yup. The system was in "beta" then (I still had the Tivo!) but I don't ever recall it crashing.

Quote:
Did you upgrade via debs or rpms or via a partition overwrite with CD?


I did a clean Kubuntu install and then installed via apt-get

Quote:
You said, it seems to happen in mythweb, what are you clicking on in mythweb? Is it when you try to schedule a program, or when you try to find out it's status, or...


It seems to happen most often when I'm clicking through the recorded shows, but sometimes it also seems to happen overnight.

Quote:
does anything spit out in /var/log/messages or /var/log/syslog when mythbackend crashes?


Nothing that I can see.

Quote:
As I stated, my system does silently die from time to time, but it has not been frequent enough for me to investigate fully.


Honestly, I'm not sure how to investigate thoroughly. I've got an extensive programming background but I know very little about the guts of Myth. If it doesn't make into the logs, I'm stuck. :(

Quote:
one thing i have head many complaints about crashing mythbackend is mythcomercialflagging. try turning it off for a bit and see if it stops crashing. =) just a thought


Thanks for the tip, but I turned that off early to eliminate another variable.

gr8nash, if you have any tips on how I can fix the problem (or isolate the problem), I'm listening...

In the meantime, I'll keep a close eye on the logs and see if anything shows up.

Author:  Xsecrets [ Wed Apr 13, 2005 6:47 pm ]
Post subject: 

well the fact that you are using kubuntu introduces many variables from what we are all using, but one suggestion would be to check and repair if necessary the database. Instructions on how to do this can be found in the tips and hints forums in a sticky post. it should work on kubuntu pretty much just like it does on knoppmyth, other than maybe having to use sudo instead of su not sure seems like there is some wierdness there in kumbuntu.

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