Kodi Community Forum

Full Version: Upgrade to v19.1 from 17.6, with MySQL, some parts of menu are now slow
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a server with Windows 10 and MySQL (v5.5) that has run Kodi 17.6 for several years.  I have a media PC connected to my tv running Windows and Kodi that I use to watch TV.

I just upgraded from 17.6 to 19.1.

Database was upgraded, software installed, everything seems to be working OK.

However!  When I am looking at a list of TV shows (for example, I click "Title" or "In Progress" when I'm in the TV Shows section), THAT menu loads quickly, but as soon as I click on any title, MySQL uses 100% of the CPU and there's a good 8-10 second delay before the list of seasons comes up.  When I click on a season, the list of episodes loads quickly.

So it's only that one particular menu that's causing MySQL to spike the CPU usage and create a delay.  When clicking on a title to see the list of episodes or list of seasons.

All the other lists seem to come up quickly (list of genres, list of actors, etc).   Even if a tv show only has ONE episode available, clicking on the title of the show will create that 8+ second delay and MySQL CPU usage spike.

Also doesn't matter which computer I'm using Kodi on (tried 3 different computers that I upgraded to 19.1, and the server itself).

Any ideas?


P.S. - in the In Progress list, it used to show how many were watched compared to total, such as "8/10" so I knew there were 2 unwatched episodes.  Now it just shows the total number of episodes.  When I click on a title, (after the delay), it correctly shows me watched or unwatched statuses of the shows.  Is this a setting to change somewhere?
(2021-08-20, 19:24)scottscomp Wrote: [ -> ]However!  When I am looking at a list of TV shows (for example, I click "Title" or "In Progress" when I'm in the TV Shows section), THAT menu loads quickly, but as soon as I click on any title, MySQL uses 100% of the CPU and there's a good 8-10 second delay before the list of seasons comes up.  When I click on a season, the list of episodes loads quickly.
MySQL needs a bit of tweaking. Try this fix https://forum.kodi.tv/showthread.php?tid=357217

While you are there, you might as well add this fix also... https://github.com/xbmc/xbmc/issues/15768
Thanks for the reply! Sorry took me so long to implement - same issue is happening with the season list taking a long time to load.

I did check my server's Task Manager while browsing the menu and the MySQL service does peg the CPU during those 5-8 seconds while waiting for the season list to come up. But browsing all the rest of the Kodi menu doesn't increase MySQL's CPU usage at all.

It's tolerable for now - I think I'll just wait for the next stable Kodi release and maybe it'll magically be fixed. Smile Thanks for your suggestions though - I did implement both.

(2021-08-20, 20:58)Karellen Wrote: [ -> ]MySQL needs a bit of tweaking. Try this fix https://forum.kodi.tv/showthread.php?tid=357217

While you are there, you might as well add this fix also... https://github.com/xbmc/xbmc/issues/15768
(2021-08-31, 04:35)scottscomp Wrote: [ -> ]It's tolerable for now - I think I'll just wait for the next stable Kodi release and maybe it'll magically be fixed.

"magically fixed" isn't gonna happen.

Btw, MySQL v5.5 was already dead at the end of 2018.
v5.7 is supported by MySQL for 2 more years till 2023.

Doubling all cache sizes in MySQL's ini file should help (I'm running 5.7 myself).
Thanks Klojum Smile Ok so "magically" is a poor choice of words - more like, developers are actively finding and fixing glitches so maybe they'll discover this one and fix it without me needing to dig through log files to find the source of the issue and report it. My schedule is crazy busy right now and I just don't have much time or energy.

I'd love to upgrade MySQL to 5.7 but I don't know how - I'll need to do some research and find the smoothest way to upgrade it. I'm somewhat capable with managing a MySQL database but unfamiliar with the upgrade process. That will be my next step in this troubleshooting process.

(2021-08-31, 06:33)Klojum Wrote: [ -> ]"magically fixed" isn't gonna happen.

Btw, MySQL v5.5 was already dead at the end of 2018.
v5.7 is supported by MySQL for 2 more years till 2023.

Doubling all cache sizes in MySQL's ini file should help (I'm running 5.7 myself).
(2021-08-31, 04:35)scottscomp Wrote: [ -> ]MySQL service does peg the CPU during those 5-8 seconds while waiting for the season list to come up
(2021-09-01, 13:51)scottscomp Wrote: [ -> ]developers are actively finding and fixing glitches so maybe they'll discover this one and fix it

As it sounds to me like an issue with MySQL rather than Kodi, I doubt that there is an issue to fix in core.  Personally, I'd ditch MySQL in favour of MariaDB which for me, certainly on Linux, has performed much better than the equivalent MySQL installation.
(2021-09-01, 21:56)black_eagle Wrote: [ -> ]Personally, I'd ditch MySQL in favour of MariaDB which for me, certainly on Linux, has performed much better than the equivalent MySQL installation.

We all have our preferences. I have MySQL 5.5 + 5.7 running on Linux since "10.04", and practically flawless, so I'm curious/interested about the "much better" part.
(2021-09-02, 06:36)Klojum Wrote: [ -> ]We all have our preferences. I have MySQL 5.5 + 5.7 running on Linux since "10.04", and practically flawless, so I'm curious/interested about the "much better" part.

Well, I was running MySQL 5.7 on Ubuntu 16.04 server.  With v18 I found that some queries seemed slow to execute so I spent some time trying to optimize it to make it faster.  It did appear to get slightly better, but never as snappy as it had been with v17.  In my quest to improve things further, I did some reading and replaced MySQL with MariaDB which instantly improved things.

I'm aware this is only my experience and it may well be down to a combination of my hardware/software etc but there is no doubt in my mind that once MariaDB was installed the performance of my shared databases improved significantly.
The slow Season view has been discussed before, here and here.  At the end of the first thread, @blodan provided a fix for people that are comfortable updating their database.