[mythtv-users] Recordings not working
Stephen Worthington
stephen_agent at jsw.gen.nz
Sun May 23 08:11:47 UTC 2021
On Sat, 22 May 2021 13:23:59 -0500, you wrote:
>On 5/22/21 1:06 PM, Gary Buhrmaster wrote:
>> On Sat, May 22, 2021 at 5:37 PM Stephen Worthington
>> <stephen_agent at jsw.gen.nz> wrote:
>>> ... But I thought that MythTV was able to cope with
>>> the database connection going away
>>
>> There is code to (attempt to) reconnect.
>>
>> As I recall it depends on the Qt Sql api
>> to properly represent a lost connection(1).
>>
>> In addition to checking other upgrades
>> that may have occurred, one should
>> probably look to see if there was a
>> recent Qt upgrade in ubuntu.
>>
>> One may need to turn up the database
>> logging to do more extensive debugging,
>> but that can be rather intense.
>>
>>
>>
>>
>> (1) FWIW, I think the MythTV code should
>> probably check for both mysql error code
>> 2006 *and* 2013.
>
>I think we're still data gathering, I put a summary here:
>
> https://forum.mythtv.org/viewtopic.php?f=36&t=4453&p=21937#p21937
>
>Need some missing information, but so far, only Ubuntu 20.04 is reporting.
My two affected systems are Ubuntu 20.04 and MariaDB 10.3.29.
I have put together a possible workaround of running mythutil
--resched every hour to keep the database connection alive. If anyone
would like to try this, I have put the files on my web server:
http://www.jsw.gen.nz/mythtv/mythtv-resched.service
http://www.jsw.gen.nz/mythtv/mythtv-resched.timer
On Ubuntu, this script will install the workaround:
sudo su
cd /etc/systemd/system
wget http://www.jsw.gen.nz/mythtv/mythtv-resched.service
wget http://www.jsw.gen.nz/mythtv/mythtv-resched.timer
chmod u=rw,og= mythtv-resched.*
systemctl daemon-reload
systemctl enable mythtv-resched.timer
systemctl start mythtv-resched.timer
systemctl start mythtv-resched.service
systemctl status mythtv-resched.service
exit
The output of the systemctl status command should look like this if it
is working correctly:
root at mypvr:~# systemctl status mythtv-resched.service
? mythtv-resched.service - MythTV reschedule service.
Loaded: loaded (/etc/systemd/system/mythtv-resched.service;
disabled; vendor preset: enabled)
Active: inactive (dead) since Sun 2021-05-23 19:17:23 NZST; 45min
ago
TriggeredBy: ? mythtv-resched.timer
Process: 28843 ExecStart=/usr/bin/mythutil --resched (code=exited,
status=0/SUCCESS)
Main PID: 28843 (code=exited, status=0/SUCCESS)
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.589545 I
PowerDBus: Added UPower.Device
'/org/freedesktop/UPower/devices/mouse_hidpp_battery_1'
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.590115 I
Power: On AC power
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.592257 I
PowerDBus: Added UPower.Device
'/org/freedesktop/UPower/devices/keyboard_hidpp_battery_0'
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.628459 I
Power: Supported actions: None
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.631485 I
MythCoreContext::ConnectCommandSocket(): Connecting to backend server:
10.0.2.4:6543 (try 1 of 1)
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.632794 I
MythCoreContext::CheckProtoVersion(): Using protocol version 91
BuzzOff
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.641151 I
Reschedule command sent to master
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.641176 I
PowerDBus: Closing interfaces
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.642648 I
Exiting
May 23 19:17:23 mypvr systemd[1]: mythtv-resched.service: Succeeded.
I am also hoping to have enough time tonight to set up a virtual
machine to test this. My plan is to take a copy of my existing Ubuntu
20.04 VM which has not been updated for months, and then try updating
to the latest v31-fixes but put the MariaDB packages on hold. There
are no recordings scheduled in the VM, so the problem should show up
overnight if it is going to. If it does not, then I can try updating
the MariaDB packages and see if it happens then. And possibly also
try with the older v31-fixes version but updated MariaDB packages.
So what debug output should I be running to get the best advantage
from these tests? Full database at loglevel debug?
More information about the mythtv-users
mailing list