My mythfilldatabase runs via cron every day at 5 pm; when I check my upcoming recordings everything is fully populated and not empty; it records the evenings programs just fine. It also shows that I have my daily 2 pm manual recording scheduled. But sometime after midnight and 2 pm the next day, the upcoming recordings list turns blank.nouglywires wrote: ↑Fri May 21, 2021 4:10 pmThe normal process is that mythfilldatabase clears out upcoming recordings and attempts to restart the backend, which buidls and maintains the upcoming recordings list. Here's the mythfilldatabase log:The problem here is that the backend restart step fails.Code: Select all
=============================================================== | Attempting to contact the master backend for rescheduling. | | If the master is not running, rescheduling will happen when | | the master backend is restarted. | =============================================================== 2021-05-20 19:49:38.270340 N mythfilldatabase run complete.
You can rebuild "upcoming recordings" by restarting the backend manually:
sudo systemctl restart mythtv-backend
This is not a database problem.
It's easy to verify this. Run mythfilldatabase and confirm that upcoming recordings is empty. Then restart the backend and see that the list is populated again.
[Solved] Scheduled recordings completely disappearing
Moderator: Forum Moderators
-
- Newcomer
- Posts: 9
- Joined: Thu May 20, 2021 10:27 pm
Re: Scheduled recordings completely disappearing
Re: Scheduled recordings completely disappearing
Checking my logs, the upcoming recordings disappeared three times in the past week, and in each instance it was when there was a time gap between recordings of greater than 8 hours, which is the default wait_timeout value.
I've increased the wait_timeout setting, and the next time there will be that large a time gap between recordings is Sunday at noon. If my upcoming recordings haven't disappeared by then, I will have some confidence that the issue is resolved.
I've increased the wait_timeout setting, and the next time there will be that large a time gap between recordings is Sunday at noon. If my upcoming recordings haven't disappeared by then, I will have some confidence that the issue is resolved.
Re: Scheduled recordings completely disappearing
Interesting! If you restart mysql without restarting mythbackend, you'll get a constant string of DBErrors. That suggests to me that that persistent connection is being queried constantly. The wait_timeout, as I understand it, severs the connect if there has been no activity on it for that duration. No activity for 8 hours seems like an improbability. Some have suggested that the mysql documentation might be wrong and the wait_timeout is in milliseconds, not seconds.
-
- Junior
- Posts: 20
- Joined: Sun Nov 23, 2014 7:17 pm
Re: Scheduled recordings completely disappearing
You shouldn't need to set up a cron job for mythfilldatabse. The backend triggers mythfilldatabase every day.My mythfilldatabase runs via cron every day at 5 pm; when I check my upcoming recordings everything is fully populated and not empty; it records the evenings programs just fine. It also shows that I have my daily 2 pm manual recording scheduled. But sometime after midnight and 2 pm the next day, the upcoming recordings list turns blank.
Is it possible that your backend runs mythfilldatabase sometime between midnight and 2pm, and that clears the upcoming recordings?
Check the last time mythfilldatabase ran with (frontend) Information Center > System Status, or MythWeb > Backend Status.
Of course, it's possible that you and I have different MythTV problems.
-
- Junior
- Posts: 46
- Joined: Sat Oct 25, 2014 4:00 pm
Re: Scheduled recordings completely disappearing
hi, anyone have a solution to this? i am having the exact same issue
mysql-server-8.0/focal-updates,focal-security,now 8.0.25-0ubuntu0.20.04.1 amd64 [installed,automatic]
mythtv-backend-master/focal,focal,now 2:31.0+fixes.202105172232.f8c59ee69d~ubuntu20.04.1 all [installed]
mysql-server-8.0/focal-updates,focal-security,now 8.0.25-0ubuntu0.20.04.1 amd64 [installed,automatic]
mythtv-backend-master/focal,focal,now 2:31.0+fixes.202105172232.f8c59ee69d~ubuntu20.04.1 all [installed]
Re: Scheduled recordings completely disappearing
Assuming you're getting the database disconnect error I mentioned in the first message of this thread, try adding wait_timeout = 2592000 to /etc/mysql/mysql.conf.d/mysqld.cnf, restart mysql, restart the backend, see how it goes.tonyguadagno wrote: ↑Fri May 21, 2021 7:20 pmhi, anyone have a solution to this? i am having the exact same issue
Re: scheduled recordings completely disappearing
I tried that, however, in mysql, the mysql command "SHOW SESSION VARIABLES LIKE 'wait_timeout';" still returns 28800. I think you have to change it with:ZedThou wrote: ↑Thu May 20, 2021 1:57 amI've put the settinglostinignorance wrote: ↑Thu May 20, 2021 1:29 amWhat file and location are you changing these settings in?in /etc/mysql/mysql.conf.d/mysqld.cnf, although it might be more "proper" to put personalized settings in /etc/mysql/my.cnfCode: Select all
wait_timeout = 2592000
I saw that thread, but didn't see any mention of the disconnect timeout in the error messages pasted there.bill6502 wrote: ↑Thu May 20, 2021 1:37 amNote issue here too: viewtopic.php?f=36&t=4450&p=21883#p21880
Code: Select all
$ mysql -u root -p -h 127.0.0.1 --init-command="SET SESSION wait_timeout={new setting}"
Re: Scheduled recordings completely disappearing
Code: Select all
mysql> SHOW global VARIABLES LIKE 'wait_%';
+---------------+---------+
| Variable_name | Value |
+---------------+---------+
| wait_timeout | 2592000 |
+---------------+---------+
1 row in set (0.04 sec)
So, the session wait_timeout in the interactive mysql client is being set to the default interactive_timeout value, which is also 8 hours.On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client
Re: Scheduled recordings completely disappearing
I've got a backend running now with DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS",
MySQLServer version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu) and MythTV Version : v32-Pre-2763-g034eb86a3f
The scheduler runs every 5 minutes (300000ms actually). It may be of interest to do the
following on a running backend: mythbackend --setverbose schedule . You'll see this in
the backend log:
(Disclosure: I'm not a scheduler person, but maybe there's more detail available.)
My test box has only been up for 4 hours. Running MFDB works.
SHOW GLOBAL VARIABLES WHERE Variable_name='wait_timeout'; is unchanged and = 28800
MySQLServer version: 8.0.25-0ubuntu0.20.04.1 (Ubuntu) and MythTV Version : v32-Pre-2763-g034eb86a3f
The scheduler runs every 5 minutes (300000ms actually). It may be of interest to do the
following on a running backend: mythbackend --setverbose schedule . You'll see this in
the backend log:
Code: Select all
2021-05-21 15:15:00.246714 I [14354/14379] Scheduler scheduler.cpp:2071 (run) - sleeping for 300000 ms (s2n: 279869 sr: 3 qr: 0 cs: 0)
My test box has only been up for 4 hours. Running MFDB works.
SHOW GLOBAL VARIABLES WHERE Variable_name='wait_timeout'; is unchanged and = 28800
-
- Newcomer
- Posts: 9
- Joined: Thu May 20, 2021 10:27 pm
Re: Scheduled recordings completely disappearing
I used to have my backend run mythfilldatabase for me; I'd give it a specific window to run in and it worked fine. However, when SchedulesDirect changed their data format and I had to use XMLTV to grab my data, I had to re-configure it by hand and so for a while, I was running it manually. I disabled the backend running mythfilldatabase and setup a cron to do it for me at a precise time each day. The main reason I was doing it this way was I had the cron job send the output through a script I had which parsed it for specific strings to I could confirm it was working properly for me. My mythfilldatabase is running exactly once a day.nouglywires wrote: ↑Fri May 21, 2021 5:36 pmYou shouldn't need to set up a cron job for mythfilldatabse. The backend triggers mythfilldatabase every day.My mythfilldatabase runs via cron every day at 5 pm; when I check my upcoming recordings everything is fully populated and not empty; it records the evenings programs just fine. It also shows that I have my daily 2 pm manual recording scheduled. But sometime after midnight and 2 pm the next day, the upcoming recordings list turns blank.
Is it possible that your backend runs mythfilldatabase sometime between midnight and 2pm, and that clears the upcoming recordings?
Check the last time mythfilldatabase ran with (frontend) Information Center > System Status, or MythWeb > Backend Status.
Of course, it's possible that you and I have different MythTV problems.
The reason I suspect a database change is that my mythtv packages have not been updated in over a year; I grab the packages by adding the PPA to my ubuntu setup, grab the most recent files and then remove the PPA; this way I'm not surprised by any changes that happen due to updates to mythtv. My box doesn't do anything else, so it has no software updates applied with one exception - it does grab the latest security updates from ubuntu automatically, and what was notable was that this issue with mythtv first started happening to me May 13th; about 1.5 days after the mysql security updates were downloaded. That's why I suspect it's some sort of mysql behavior change.
I've made the wait_timeout=172800 on my server last night; that's 2 days in seconds, which should be more than enough time. It's just before 2 pm and normally by now my scheduled recordings queue would be empty; it looks totally populated now which is a good sign. If it still looks this way by tomorrow I believe this was the problem.
Now the big question is; what is it about the mysql updates that made this behavior change?
-
- Junior
- Posts: 46
- Joined: Sat Oct 25, 2014 4:00 pm
Re: Scheduled recordings completely disappearing
sorry i missed that, trying now, both of theseZedThou wrote: ↑Fri May 21, 2021 7:46 pmAssuming you're getting the database disconnect error I mentioned in the first message of this thread, try adding wait_timeout = 2592000 to /etc/mysql/mysql.conf.d/mysqld.cnf, restart mysql, restart the backend, see how it goes.tonyguadagno wrote: ↑Fri May 21, 2021 7:20 pmhi, anyone have a solution to this? i am having the exact same issue
wait_timeout = 172800
interactive_timeout = 172800
btw, my file was /etc/mysql/mysql.conf.d/mythtv.cnf not the other one referenced earlier
Re: Scheduled recordings completely disappearing
I'm seeing the same issue.
Running 31+fixes on Ubuntu 20.04 (LTS).
As with others, restarting the backend fixes the problem - until the next day. Interestingly today no restart was required.
I've also noticed that "sudo systemctl stop mythtv-backend" never completes. Not sure if this is related.
A snippet of backend log when experiencing the problem and doing a manual scheduled record is attached.
Running 31+fixes on Ubuntu 20.04 (LTS).
As with others, restarting the backend fixes the problem - until the next day. Interestingly today no restart was required.
I've also noticed that "sudo systemctl stop mythtv-backend" never completes. Not sure if this is related.
A snippet of backend log when experiencing the problem and doing a manual scheduled record is attached.
Re: Scheduled recordings completely disappearing
Yesterday, I tripled the timeouts and restarted mysql and myth-backend. This morning, the scheduler ran at 07:59:00 without generating an error. Fingers crossed.
Re: Scheduled recordings completely disappearing
Code: Select all
Name Ubuntu MythTV MySQL
ZedThou 20.04 master 8.0.25
lostinignoramce 20.04 ? ?
nouglywires 20.04 31 @ commit f8c59ee ?
crowston 20.04 31.0 8.0.25
spotlessyougart 20.04 31+fixes MariaDB 10.3.29
BillK 20.04 31.0 8.0.23 # Happens at 0759, MFDB runs at 1200
tonyguadagno 20.04 31.0 @ commit f8c59ee 8.0.25
jusmop 20.04 31+fixes 8.0.25
jhoyt 20.04 master 8.0.25
justin 20.04 31+fixes ?
stephen 20.04 31+fixes MariaDB 10.3.29 # Happened on 2 MythTV systems
jan 20.04 31+fixes 8.0.25
are from the -users mailing list.
- All can restart the backend as a Band Aid.
- ?All? are running Ubuntu, no other OS users have reported, need to verify this.
- 8+ hours of inactivity seems important, e.g overnight