18.9 crashing/freezing upon resume from standby with MariaDB 10.5.8
#1
I recently switched to a central database running with MaraDB 10.5.8 and fresh installs of Libreelec 9.2.6 on 5x different HTPCs.  Browsing works great, really fast despite using  a large database.

I did need to set a 10 second delay to wait for a network connection to ensure Kodi could see the database.

The issue I'm seeing is that occasionally upon resume from standby, Kodi locks up completely, I can still SSH to the machines to instruct a reboot but Kodi is totally unresponsive.  This has occured on all 5 different machines (4x Gigabyte Brix and 1x Intel NUC).

I've enabled debug logging but I can't replicate issue easily, so I'll post the log as soon as I capture it when it happens.

I just wanted to ask if anyone else has had something similar before?
Reply
#2
It can depend on the Brixs and NUCs, which chipset and so on. Some Linux kernels have suspend quirks. Too bad no details were given whatsoever no machine details. There have been some 20-30 different NUC/Brix setups over the years.

I don't think MariaDB matters, at all. What device and OS is the MariaDB running on?
Reply
#3
(2021-01-25, 17:31)Klojum Wrote: It can depend on the Brixs and NUCs, which chipset and so on. Some Linux kernels have suspend quirks. Too bad no details were given whatsoever no machine details. There have been some 20-30 different NUC/Brix setups over the years.

I don't think MariaDB matters, at all. What device and OS is the MariaDB running on?

Thanks for the quick reply, MariaDB is running on Win Server 2019 with Ryzen 3900x and 64GB from a Samsung 980 Pro NVMe.

The Gigabyte Brix are all BRIX GB-BKI5HA-7200U and the Intel NUC is a Bean Canyon NUC8i5BEH3 i5 8259U all with SSDs and 8GB (had the issue on all of the machines).

I tested running them with local databases and the issue never arose.
Reply
#4
Here's a a debug log of a freezing incident.   

I resume from suspend, initially it looks okay and then the GUI just completely freezes. 

I can still SSH and there's still something going on in the background (sometimes the GUI comes back to life after 5-10 mins but this time its been frozen for 23 minutes so far).

https://pastebin.com/k5zZ0BVL
Reply
#5
It's just come back to life after 24 minutes, here's the rest of the log from mid-freeze to being okay again.

https://pastebin.com/QRXFgPRA
Reply
#6
(2021-01-27, 12:43)TCCalvin Wrote: Here's a a debug log of a freezing incident.   
Lovely... Log snippets again.
DEBUG: GetAlbumsByWhereJSON - query took 51 ms
Nothing visible there. The database is working.

Is your Win Server 2019 with Ryzen 3900x and 64GB from a Samsung 980 Pro NVMe also going into suspend? I know Windows can trigger a low(er) power setting for the LAN card after a few minutes.

sql:
... WHERE albumview.strReleaseType = 'album' ORDER BY RAND() LIMIT 20) AS a1 JOIN album_artist ON album_artist.idAlbum = a1.idAlbum JOIN artist ON artist.idArtist = album_artist.idArtist GROUP BY a1.idAlbum, album_artist.idArtist ORDER BY a1.idAlbum, album_artist.iOrder
2021-01-27 10:34:00.144 T:140549264742144 DEBUG: GetAlbumsByWhereJSON - query took 51 ms
2021-01-27 10:42:57.237 T:140550240229504 INFO: MYSQL server has gone. Will try 4 more attempt(s) to reconnect.
2021-01-27 10:42:57.243 T:140550240229504 DEBUG: WindowVideoNav::GetDirectory

Kodi still works and your SQL database server is gone after 7-8 minutes ?!
Reply
#7
(2021-01-27, 13:19)Klojum Wrote:
(2021-01-27, 12:43)TCCalvin Wrote: Here's a a debug log of a freezing incident.   
Lovely... Log snippets again.
DEBUG: GetAlbumsByWhereJSON - query took 51 ms
Nothing visible there. The database is working.

Is your Win Server 2019 with Ryzen 3900x and 64GB from a Samsung 980 Pro NVMe also going into suspend? I know Windows can trigger a low(er) power setting for the LAN card after a few minutes.

sql:
... WHERE albumview.strReleaseType = 'album' ORDER BY RAND() LIMIT 20) AS a1 JOIN album_artist ON album_artist.idAlbum = a1.idAlbum JOIN artist ON artist.idArtist = album_artist.idArtist GROUP BY a1.idAlbum, album_artist.idArtist ORDER BY a1.idAlbum, album_artist.iOrder
2021-01-27 10:34:00.144 T:140549264742144 DEBUG: GetAlbumsByWhereJSON - query took 51 ms
2021-01-27 10:42:57.237 T:140550240229504 INFO: MYSQL server has gone. Will try 4 more attempt(s) to reconnect.
2021-01-27 10:42:57.243 T:140550240229504 DEBUG: WindowVideoNav::GetDirectory

Kodi still works and your SQL database server is gone after 7-8 minutes ?!

Server is up 24/7 with all power saving disabled.  HTPCs and server are all hard-wired, no WiFi.

This only ever occurs on whilst resuming from a suspend with the HTPC, never on a fresh boot.

The GUI freezes for 5-25 mins, you can still access the machine via SSH.

You can continue to use Kodi if you sit and wait for the 5-25 mins freeze to end. (everything works fine from that point)

I've disabled "update library on startup" too, as I thought maybe the scan from resume was causing this, but even without this, it's still occurred.
Reply
#8
More complete log (only thing edited out is the scanned media paths/filenames as some dirs/titles are home videos with names etc)

https://pastebin.com/vmKzxTnK
Reply
#9
I uninstalled MariaDB 10.5.8 and created a new database with MariaDB 10.2.36

Same problem.

I found this old thread from 5 years ago, similar(ish) problem but I don't get the "can't create" errors

https://forum.kodi.tv/archive/index.php?...22069.html
Reply
#10
Here's a challenge: How about trying MySQL 5.7.x, instead of MariaDB, and instead of MySQL 8.x ?
Reply
#11
(2021-01-29, 20:18)Klojum Wrote: Here's a challenge: How about trying MySQL 5.7.x, instead of MariaDB, and instead of MySQL 8.x ?
I've actually just installed 5.7.32 on a completely different machine to test, cheers.  👍

I briefly tried MySQL prior to switching to MariaDB, it was a bit sluggish when browsing TV Shows which is why I didn't stick with it.
Reply
#12
MariaDB has its own challenges (doubling all caches usually helps a bit), as does MySQL 8.
MySQL 5.7 "normally" works well OOTB.
Reply
#13
(2021-01-29, 21:05)Klojum Wrote: MariaDB has its own challenges (doubling all caches usually helps a bit), as does MySQL 8.
MySQL 5.7 "normally" works well OOTB.

MySQL is a no-go, TV Show browsing is so slow it's painful to use (with a large library).  Around 10 seconds to enter a show and another 10 seconds to enter a season.

I added a few tweaks from a few posts I read through but seemed to make little to no difference.
Reply
#14
(2021-01-30, 10:14)TCCalvin Wrote: MySQL is a no-go, TV Show browsing is so slow it's painful to use (with a large library).

Hmm... Slow? Again, try doubling all caching in my.ini or my.cnf.
I've been running v5.7 for years with any hiccups (on a Linux OS btw). Perhaps Windows is creating a bumpy road.

And what is "large"? A database engine shouldn't start to sweat until a couple of million records per table are involved.
Reply
#15
(2021-01-30, 12:26)Klojum Wrote:
(2021-01-30, 10:14)TCCalvin Wrote: MySQL is a no-go, TV Show browsing is so slow it's painful to use (with a large library).

Hmm... Slow? Again, try doubling all caching in my.ini or my.cnf.
I've been running v5.7 for years with any hiccups (on a Linux OS btw). Perhaps Windows is creating a bumpy road.

And what is "large"? A database engine shouldn't start to sweat until a couple of million records per table are involved.

Thanks - I tried doubling the cache, I think it was marginally better but I still get the busy icon when trying to access shows/seasons for around 6 seconds each time.

Coming back out of the shows/seasons is instant.

With MariaDB, entering shows/seasons is instant, and I see the busy icon for around 1s when coming back to the main show listing. (but obviously get that weird freeze upon resuming, which can last up to 30 minutes)
Reply

Logout Mark Read Team Forum Stats Members Help
18.9 crashing/freezing upon resume from standby with MariaDB 10.5.80