Author |
Message |
marc.aronson
|
Posted: Mon Jan 05, 2009 10:22 pm |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
I installed a new r5.5 system for my daughter and I've noticed the following warning in the mythweb status page:
Quote: Last mythfilldatabase run started on 2009-01-05 19:52 and ended on 2009-01-05 19:52. mythfilldatabase ran, but did not insert any new data into the Guide for 2 of 2 sources. This can indicate a potential grabber failure. There's guide data until 2009-01-19 03:00 (14 days).
I've done some digging and from what I can see, the data is being properly downloaded but the logs show that mythfilldatabase is running every 3 hours. This likely explains the status warning since this means that 7 of the 8 times it runs each day there actually isn't any new data to add. The real mystery is: Why is mythfilldatabase running every 3 hours? Has anyone seen this before?
_________________ Marc
The views expressed are my own and do not necessarily reflect the views of my employer.
|
|
Top |
|
 |
bigbro
|
Posted: Tue Jan 06, 2009 12:10 am |
|
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location:
Kitsap Peninsula, Wa., United States
|
I have noticed the same issue that it is running multiple times each day.
|
|
Top |
|
 |
marc.aronson
|
Posted: Tue Jan 06, 2009 9:16 am |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
I un-selected the option that says to run mythfilldatabase at the time suggested by the service provider and it has stopped running every 3 hours. Given the timing of the last run (19:52 on Jan 5) and the window of hours I've selected to allow it to run (1AM - 5AM), I won't know until tomorrow morning if it runs successfully during the 1am - 5am window. I'll provide an update tomorrow morning.
Marc
_________________ Marc
The views expressed are my own and do not necessarily reflect the views of my employer.
|
|
Top |
|
 |
bigbro
|
Posted: Tue Jan 06, 2009 11:08 am |
|
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location:
Kitsap Peninsula, Wa., United States
|
Marc, I saw that as well.
I guess that while this does put an extra load on the servers. The numerous updates has caught a few sudden schedule changes. That is a good thing.
|
|
Top |
|
 |
ceenvee703
|
Posted: Tue Jan 06, 2009 6:32 pm |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
marc.aronson wrote: Why is mythfilldatabase running every 3 hours? Has anyone seen this before?
I have seen that before (running every 3 hours) but unfortunately I can't remember what the cause was.
Maybe I just worked around the problem by not using the "run at recommended times" option and just running randomly between some hours of the day. Or maybe I poked some values into the DB.
EDIT: here's my message about this from a while back
http://mysettopbox.tv/phpBB2/viewtopic. ... er+failure
|
|
Top |
|
 |
jmckeown2
|
Posted: Tue Jan 06, 2009 9:07 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
hmm just checked the logs. looks like it's hitting me too.
Does it mean Schedules Direct is suggesting a wrong time?
|
|
Top |
|
 |
marc.aronson
|
Posted: Wed Jan 07, 2009 3:58 am |
|
Joined: Tue Jan 18, 2005 2:07 am
Posts: 1532
Location:
California
|
marc.aronson wrote: I un-selected the option that says to run mythfilldatabase at the time suggested by the service provider and it has stopped running every 3 hours. Given the timing of the last run (19:52 on Jan 5) and the window of hours I've selected to allow it to run (1AM - 5AM), I won't know until tomorrow morning if it runs successfully during the 1am - 5am window. I'll provide an update tomorrow morning.
I can confirm that this solves the problem.
Edit: I opened this threadat the schedules direct forum.
_________________ Marc
The views expressed are my own and do not necessarily reflect the views of my employer.
|
|
Top |
|
 |
jmckeown2
|
Posted: Thu Jan 29, 2009 6:03 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
marc.aronson wrote: I can confirm that this solves the problem.
Technically I'd use the term "Workaround"rather than "Solve"
The schedules direct thread indicates that they are returning a good time recommendation. rmeden sayes he got a 10 hr reco. When I run mythfilldatabase from the commandline I got a 23 hour reco, which is perfect.
"Run at suggested times" is still broken. I presume that's an upstream problem not KM.
|
|
Top |
|
 |
jmckeown2
|
Posted: Fri Jan 30, 2009 5:37 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
I delved into the sources and came up with a better workaround. (First time in years I've looked at c++) As it turns out the problem in my case comes from "run at recommended times" being enabled, but the setting for the next run time is NOT in the database.
If this is your case you can confirm it on the MythWeb Backend Status page at the bottom there is: Quote: Last mythfilldatabase run started on 2009-01-30 10:13 and ended on 2009-01-30 10:13. mythfilldatabase ran, but did not insert any new data into the Guide for 2 of 4 sources. This can indicate a potential grabber failure. Suggested next mythfilldatabase run: 2009-01-31 14:25. There's guide data until 2009-02-13 05:00 (14 days).
If you're missing the bolded line then you have the same problem I had.
When mythfilldatabase completes it UPDATEs the setting "MythFillSuggestedRuntime" the problem with UPDATE is that it can only change an existing DB value. It will not create the value. Without that setting the backend housekeeping thread thinks you've just activated the feature and runs mythfilldatabase ASAP, but not sooner then 3 hours after the last run. That's why it runs every three hours.
To make the problem go away and fix the suggested grabber time. run the following in mysql: Code: INSERT into `mythconverg`.`settings` (`value`, `data`) VALUES ('MythFillSuggestedRunTime', '2009-01-01T12:00:00');
EDIT: Corrected time format...
mythfilldatabase will run once more at the 3-hour mark, then honor the suggested time from there.
The bug here is that the setting was missing. I don't recall EVER seeing the suggested time on my mythweb. To fix for real I think someone upstream should modify mythlib to check if the UPDATE failed, and if so try an INSERT.
In the meantime, I know the KM setup makes some settings, I would recommend the KM devs add something to ensure a value is in there.
Last edited by jmckeown2 on Sun Feb 01, 2009 10:54 am, edited 1 time in total.
|
|
Top |
|
 |
tjc
|
Posted: Fri Jan 30, 2009 9:38 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
I had this problem too and had a DB entry but the contents looked bad:
Code: root@black2:~# settings.sh -d | grep -i suggest MythFillGrabberSuggestsTime 0 NULL MythFillSuggestedRunTime 2009-01-09T01:07:29 NULL
Note the 'T' where there should be a space.... I'll have to re-enable the MythFillGrabberSuggestsTime setting and wait to verify that the problem is really gone, but it sure sounds like a data feed glitch coupled with lack of defensive coding...
|
|
Top |
|
 |
jmckeown2
|
Posted: Fri Jan 30, 2009 11:06 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
tjc wrote: Note the 'T' where there should be a space....
Believe it or not the 'T' is OK. My script was wrong for OMITTING the 'T' here's the relevant snippet from the housekeeper that is reading the setting Code: if (grabberSupportsNextTime && gContext->GetNumSetting("MythFillGrabberSuggestsTime", 1)) { QDateTime nextRun = QDateTime::fromString( gContext->GetSetting("MythFillSuggestedRunTime", "1970-01-01T00:00:00"), Qt::ISODate); QDateTime lastRun = getLastRun("MythFillDB"); QDateTime now = QDateTime::currentDateTime();
if ((nextRun < now) && (lastRun.secsTo(now) > (3 * 60 * 60))) runMythFill = true; } else if (wantToRun("MythFillDB", period, minhr, maxhr)) { runMythFill = true; }
it parses the setting as an ISODate The relevant detail from my assessment is that the setting row merely has to exist to break the 3-hour cycle.
After the backend ran the mythfilldatabase for me the setting was updated with the 'T' and it still displays correctly on the MythWeb status page, so the value is apparantly being understood.
I see from MythFillGrabberSuggestsTime, that you disabled the feature, if you re-enable it does it go back into the 3-hour cycle, and does the MythFillSuggestRunTime get updated properly?
|
|
Top |
|
 |
cliffsjunk
|
Posted: Sun Feb 01, 2009 2:03 am |
|
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
|
Hmmm... Mine seems to be ok.
Quote: Last mythfilldatabase run started on 2009-01-31 14:48 and ended on 2009-01-31 14:48. Successful. Suggested next mythfilldatabase run: 2009-02-01 09:10. There's guide data until 2009-02-14 06:00 (13 days). DataDirect Status: Your subscription expires on 10/01/09 21:50:41
I remember once seeing it redownload a time slot because it didn't find quite enough shows in it. If you have some blank channels somehow that might be an issue.
Cliff
|
|
Top |
|
 |
ceenvee703
|
Posted: Sun Feb 01, 2009 7:56 am |
|
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location:
Virginia, USA
|
I'd been doing the workaround as well (not letting it run at suggested time).
I poked the dummy time value in via MySQL (I used the "T" formatted style) and turned back on the "suggested time" option in Settings, and all appears to be working well... no errors, and next suggested time appears in MythWeb where it hadn't before.
Thanks very much for the fix jmckeown2!
|
|
Top |
|
 |
tjc
|
Posted: Sun Feb 01, 2009 11:18 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
No joy here. It's back to that evil every 3 hours nonsense this morning...
|
|
Top |
|
 |
jmckeown2
|
Posted: Sun Feb 01, 2009 12:44 pm |
|
Joined: Sat Sep 02, 2006 9:17 am
Posts: 359
|
tjc wrote: No joy here. It's back to that evil every 3 hours nonsense this morning...
Any changes in the settings values? What's in the housekeeping table? Any help in in the logs? For reference:
Code: mysql> SELECT * FROM `mythconverg`.`housekeeping` where tag ='MythFillDB'; +------------+---------------------+ | tag | lastrun | +------------+---------------------+ | MythFillDB | 2009-01-31 14:28:49 | +------------+---------------------+ 1 row in set (0.00 sec) Code: mysql> SELECT * FROM `mythconverg`.`settings` where `value` like 'mythfill%' and hostname IS NULL; +-------------------------------+-----------------------------------------------+----------+ | value | data | hostname | +-------------------------------+-----------------------------------------------+----------+ | MythFillDatabaseArgs | --quiet | NULL | | mythfilldatabaseLastRunEnd | 2009-01-31 14:31 | NULL | | mythfilldatabaseLastRunStart | 2009-01-31 14:31 | NULL | | mythfilldatabaseLastRunStatus | Successful. | NULL | | MythFillDatabaseLog | /var/log/mythtv/mythfilldatabase.log | NULL | | MythFillDatabasePath | /usr/bin/nice -n 19 /usr/bin/mythfilldatabase | NULL | | MythFillEnabled | 1 | NULL | | MythFillGrabberSuggestsTime | 1 | NULL | | MythFillMaxHour | 5 | NULL | | MythFillMinHour | 2 | NULL | | MythFillPeriod | 1 | NULL | | MythFillSuggestedRunTime | 2009-02-01T22:06:30 | NULL | +-------------------------------+-----------------------------------------------+----------+ 12 rows in set (0.00 sec)
|
|
Top |
|
 |