[mythtv-users] Recordings not working

Bill Meek keemllib at gmail.com
Tue May 25 17:57:47 UTC 2021


On 5/25/21 12:30 PM, Gary Buhrmaster wrote:
> On Tue, May 25, 2021 at 5:01 PM Paul Harrison <mythtv at mythqml.net> wrote:
> 
>> mythzmserver doesn't use Qt so connects to the ZM DB through the client
>> library. It does set the reconnect flag but for reliability it still
>> periodically kicks the DB by sending a dummy "SELECT NULL;" query.
> 
> As I recall, old (no longer supported?) versions
> of mysql automatically reconnected, and then
> it was changed to not auto reconnect to avoid
> resetting transaction state out from under the
> applications without notice, and the option was
> made available to revert to the previous behavior.
> Belt and suspenders in MythTV was almost
> certainly the best (only?) choice during those
> various transitions of mysql versions.
> 
>> It's very possible that kicking the DB is not
>> required anymore with newer versions of the
>> client library but I've not tried it.
> 
> If the code works, the old adage of not
> "improving" it often applies.

Just pushed a fix for master. I'll let it soak for some time
before back porting to v31.0.

Users that have the wait_timeout timeout work around should remove it,
or you can set it to a few minutes to have the disconnect happen more
often. mythbackend --seterbose general:debug will allow a new log
message: ...mythdbcon.cpp:947 (lostConnectionCheck) - SQL Native Error Code: n.
The code will be 4031 for 20.04 users with mysql* 8.0.25 or 2006 if
that fix isn't in yet.

It's only slightly improved (in my opinion about the slightly and
or improved parts).

Looking at git log -p mythtv/libs/libmythbase/mythdbcon.cpp,
I believe if reconnecting is successful, the query is retried.
Several changes to improve this were done log ago.

-- 
Bill


More information about the mythtv-users mailing list