-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduler logs "Error preparing query" and does not auto-recover #359
Comments
|
The cause (at least for MySQL) is a new error code introduced in 8.0.24. The existing logic Until the fix is released, increasing the default 8 hour wait_timeout is a known workaround The 4031 error code has a different meaning in MariaDB. Open issue for MythTV: |
|
I just found out that this issue does not only affect the backend as I initially reported, but also the frontend. That is: I just came back to a frontend that had been left running idle for many hours, and it could not find any recordings. Restarting the frontend recovered from this situation. The frontend's logfile also contains the signature "Error preparing query" lines. Once again I attach an unfiltered mythfrontend.log -- as I said you can find an occurrence of this issue by searching for "Error preparing query". |
A new error code was introduced in MySQL client v8.0.24 that mythdbcon.cpp didn't handle. Users would loose the ability to make any recordings. Reported on the -users list and Forum for Ubuntu 20.04 users after a recent updat to mysql* v8.0.25 and MythTV v31.0 or master. Two MariaDB users also reported. Tests with wait_timeout set to 300 (seconds). 18.04 (which doesn't have the problem): Scheduler scheduler.cpp:2310 (HandleReschedule) - Reschedule requested for PLACE PrepareToRecord Scheduler mythdbcon.cpp:947 (lostConnectionCheck) - SQL Native Error Code: 2006 Scheduler mythdbcon.cpp:260 (Reconnect) - MySQL reconnected successfully 20.04: Scheduler scheduler.cpp:2309 (HandleReschedule) - Reschedule requested for MATCH 0 0 0 - MythUtilCommand Scheduler mythdbcon.cpp:879 (prepare) - SQL Native Error Code: 4031 Scheduler mythdbcon.cpp:260 (Reconnect) - MySQL reconnected successfully No testing on MariaDB has been yet. Refs #359
|
I also have the same issue, let me know if you need any more examples:
|
|
Another data point. I restarted the backend, and mythtv-status. and things seemed to come good again.
mythtv 2:31.0+fixes.202105172232.f8c59ee69d~ubuntu20.04.1 |
A new error code was introduced in MySQL client v8.0.24 that mythdbcon.cpp didn't handle. Users would loose the ability to make any recordings. Reported on the -users list and Forum for Ubuntu 20.04 users after a recent updat to mysql* v8.0.25 and MythTV v31.0 or master. Two MariaDB users also reported. Tests with wait_timeout set to 300 (seconds). 18.04 (which doesn't have the problem): Scheduler scheduler.cpp:2310 (HandleReschedule) - Reschedule requested for PLACE PrepareToRecord Scheduler mythdbcon.cpp:947 (lostConnectionCheck) - SQL Native Error Code: 2006 Scheduler mythdbcon.cpp:260 (Reconnect) - MySQL reconnected successfully 20.04: Scheduler scheduler.cpp:2309 (HandleReschedule) - Reschedule requested for MATCH 0 0 0 - MythUtilCommand Scheduler mythdbcon.cpp:879 (prepare) - SQL Native Error Code: 4031 Scheduler mythdbcon.cpp:260 (Reconnect) - MySQL reconnected successfully No testing on MariaDB has been yet. Fixes #359 (cherry picked from commit e55471f)
mythbackend.log
Platform: Ubuntu 20.04
MythTV version: v31.0+fixes
Package version: v31.0+fixes.202105172232.f8c59ee69d~ubuntu20.04.1
Component: Backend (scheduler)
Multiple users, including myself, are reporting on the users mailing list that recordings are failing at unpredictable times. It is unclear what triggers this condition. Symptoms include:
I attach multiple days' worth of logs, since I don't know how to select a sensible subset. You can find occurrences of the issue by searching for "Error preparing query", noting that the first hit is NOT an example of this issue because in this instance the backend does manage to reestablish its database connection.
The text was updated successfully, but these errors were encountered: