Kodi Community Forum

Full Version: MariaDB Issues on my Pi 4b
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Mysql Server Setup:
Pi 4 b running Raspbian GNU/Linux 10 (buster)
MariaDB version 10.0

Client:
Kodi 18.9 on Windows 10
Addon - Youtube2KodiLibrary https://github.com/evantaur/plugin.youtube2kodilibrary


Hi All,

So I've been running this setup just fine for the longest of times but I had noticed degradation to my performance and especially even more since I have recently installed "YouTube2kodilibrary" addon which basically pulls nfo and strm files off of youtube channels which you can then scan into Kodi as a TV show. This works great but has slowed my Kodi experience even further.

I decided to upgrade my MariaDB server and also dropped my database so I could start fresh. This worked amazing until I started to scrape the Youtube stuff. I then experienced scraping failures such as halfway through receiving messages that the show could not be found, which would result in either most of the scrape not being completed. I would say 70% of the shows scraped fine, others had issues. Even trying to manually run the unscraped strm files would either lead to playing the video or flat out making Kodi crash without notice. Of the videos that played fine, I could manually scrape them individually as well.
But Kodi ran at an amazing speed in terms of navigating the library, no lag whatsoever.

So after various testing and restoring my Pi 4 backup image several I came to the following conclusions:
1. MariaDB 10.0 can scrape all the Youtube files fine, but then Kodi slows down to a crawl. Im talking 10-15 minutes to open up a TV show to view the episodes.
2. MariaDB 13.0 will not scrape properly but Kodi works reaaally fast. In the log there was multiple instances of "SQL: [MyVideos116] Undefined MySQL error: Code (1366)"
3. Hiding my advancedsettings.xml, I can scrape the Youtube files to my local database without issues.

So there must be something wrong with MariaDB, right? I noticed some of the nfo files from Youtube2Kodilibrary being quite long and also having some irregular letters/symbols which maybe MariaDB 13.0 doesn't like? Maybe MariaDB 10.0 will take them in, hence the slow performance as the database is struggling with the odd characters?

The only thing I tried with Mariadb was to alter the database structure, as I saw people having isssues with scraping nfo files which have many URLS, with the following command to increase the field size of column c06:
ALTER TABLE MyVideos116.tvshow MODIFY COLUMN c06 longtext DEFAULT NULL NULL;

Which didn't help. Any Idea how I should proceed? If logs of Kodi are need, just let me know which "error" you would like me to reproduce. I have a feeling I need to adjust the MariaDB though.

Much appreciated!

Regards,

Deep
(2022-11-09, 11:55)deep87 Wrote: [ -> ]Any Idea how I should proceed?

Any database column problems upto Kodi 18 have been fixed in Kodi 19. You are still running Kodi 18.

What is your MariaDB database server running on? If it's the same RPi4 with an SDcard, I'm personally not that confident with volatile SDcards running a relational database server as there are relatively lots of small data writes to the database. SDcards are not famous for their writing capabilities.

Btw, ERROR 1366: Incorrect string value . If that comes from your youtube2kodilibrary add-on, then we are not your first contact person. You also provided no debug log (wiki), so there is nothing to further examine.
(2022-11-09, 12:24)Klojum Wrote: [ -> ]
(2022-11-09, 11:55)deep87 Wrote: [ -> ]Any Idea how I should proceed?

Any database column problems upto Kodi 18 have been fixed in Kodi 19. You are still running Kodi 18.

What is your MariaDB database server running on? If it's the same RPi4 with an SDcard, I'm personally not that confident with volatile SDcards running a relational database server as there are relatively lots of small data writes to the database. SDcards are not famous for their writing capabilities.

Btw, ERROR 1366: Incorrect string value . If that comes from your youtube2kodilibrary add-on, then we are not your first contact person. You also provided no debug log (wiki), so there is nothing to further examine.

Thanks for your response!

Due to the fact I also run Kodi also on my RetroPie build, which hasnt been updated to kodi 19.x yet. So due to using Mysql Ive been kinda forced to stick with kodi 18.9 for now.

MariaDB is running on a Pi4b but I am using a 16gb USB stick as a boot device, Ive not used SD cards in a while.

Youtube2kodilibrary works fine when scraping on my local sqlite database, just not with MariaDB. Well, with version 10 it scrapes but then has bad performance. Version 13 wont scrape properly but then runs blazing fast.
Also, If I scrape with MariaDB 10 and then upgrade to MariaDB 13, Kodi works great and I also see the videos with odd characters in the titles being displayed with boxes in the place of the odd characters. But I cannot scrape any new Youtube channels properly again as I run into the same scraping issue.

Ive uploaded the log. This is with MariaDB 13 so you can see the scraping error 1366.
OK, after googling around I decided to just try out 19.4 on my Laptop. Its working great with the upgraded MariaDB and the Youtube2KodiLibrary is working fine after updating it. Its working very snappy overall.

So for my RetroPie build I will just use Kodi as a fancy "media browser" and I can just manually go through my folders to view media since that has to stay on 18.7 for now until Retropie gets officially onto Bullseye (which has Kodi 19.4 available).

At least now I can update Kodi on several devices and use it as normal there.
Hmm OK I made a mistake, I forgot to activate my advancedsettings.xml file so Kodi 19.4 was working with the local database. Now im connected to the mysql server again.

I just tried to scrape a troublesome Youtube channel from before and and kodi flat out crashed after scraping 36 out of the 151 videos, where as before, I would get an error message which I had to "ok". Hmmm. Youtube2kodilibrary seems to hate MariaDB.

I noticed theres a thread with the developer of this addon, so I posted there with a link to this thread. Fingers crossed he is around.
What's the channel? NVM found info i need

Code:

Query: UPDATE episode SET c00='How Russia was Annihilated at Tannenberg | Animated History',c01='Support My Channel! Sign up to 🏰 Vikings War Of Clans and get the 💫 “Novice’s Relocation” item and 200 💰 Gold for FREE:\n➤ https://bit.ly/2WdyEsv\nLook me up under the nickname: ArmchairHistorian\n\nCorrections: https://www.reddit.com/r/badhistory/comm...of/\n\nThe Battle of Tannenberg, 1914\n\nSign up for The Armchair Historian website today:\nhttps://www.thearmchairhistorian.com/\n\nIronside Computers - Click here to customize your own PC: https://ironsidecomputers.com/ **USE DISCOUNT CODE \"History\" FOR 5OFF!**\n\nSources:\nShowalter, Dennis E. Tannenberg Clash of Empires. Archon Books, 1991, 120\nHorne, Charles F. Source Records of the Great War, National Alumni, 1923.\nNorwitz, Jeffrey H. Leveraging Operational Intelligence - The Battle of Tannenberg and Masurian Lakes (1914).NAVAL WAR COLL. NEWPORT RI, 2001.\nParrott, Andrew. “The Baltic States from 1914 to 1923: The First World War and the Wars of Independence.” Baltic Defence Review 2, no. 8 (2002): 13-58.\nGurko, Vasili Iosfovich & Gourko, Basil. War and Revolution n Russia, 1914-1917, Macmillan, 1919.\nhttps://www.themaparchive.com/media/catalog/product/cache/1/image/b9d24ee63e043d9dae72d8cfeefe8ff8/A/x/Ax00229.jpg\nhttps://upload.wikimedia.org/wikipedia/commons/a/a4/BattleOfTannenberg2.jpg\n\nMusic:\nHero Theme by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)\nSource: http://incompetech.com/music/royalty-fre...91\nArtist: http://incompetech.com/\n\nOn the Hills of Manchuria by Ilya Alekseevich Shatrov\n\nEgmont Overture by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)\nSource: http://incompetech.com/music/royalty-fre...69\nArtist: http://incompetech.com/\n\nCrusade - Video Classica by Kevin MacLeod is licensed under a Creative Commons Attribution license (https://creativecommons.org/licenses/by/4.0/)\nSource: http://incompetech.com/music/royalty-fre...84\nArtist: http://incompetech.com/\n\nVictoria II. Copyright © 2018 Paradox Interactive AB. www.paradoxplaza.com\n\nAntonio Salieri, Twenty six variations on La Folia de Spagna\nLondon Mozart Players\nMatthias Bamert, as conductor\n\n\nVictoria II. Copyright © 2018 Paradox Interactive AB. www.paradoxplaza.com',c03='-1',c04='The Armchair Historian',c05='2019-01-25',c06='<thumb>https://i.ytimg.com/vi/vvx0HMFBF-c/maxresdefault.jpg</thumb>',c07='',c09='660',c10='The Armchair Historian',c11='',c12='2019',c13='3',c14='',c15='-1',c16='-1',c17='-1',c18='C:\\Users\\87nav\\AppData\\Roaming\\Kodi\\userdata\\library\\series\\UCeUJFQ0D9qs6aVNyUt9fkeQ\\2019\\s2019e3.strm',c19='2049',c20='-1', userrating = NULL, idSeason = 4042 where idEpisode=99674
2022-11-09 10:54:30.841 T:25824 ERROR: CVideoDatabase::SetDetailsForEpisode (C:\Users\87nav\AppData\Roaming\Kodi\userdata\library\series\UCeUJFQ0D9qs6aVNyUt9fkeQ\2019\s2019e3.strm) failed
(2022-11-09, 22:25)evantaur Wrote: [ -> ]What's the channel?

One of them is "The Armchair Historian". It has 159 videos but when I attempt to scrape it, it only manages 36 when connect to the mysql server.

Thanks so much for looking into this Big Grin
Not sure what would cause MariaDB to fail here.

s2019e3.nfo
s2019e3.strm
@evantaur

I was about to purge you as a spammer until I saw your post count.

Your nfo looks like one big spam post. Can you explain that please? I refuse to believe that is your nfo file.
(2022-11-09, 23:39)Karellen Wrote: [ -> ]@evantaur

I was about to purge you as a spammer until I saw your post count.

Your nfo looks like one big spam post. Can you explain that please? I refuse to believe that is your nfo file.
It scrapes video description from this guys youtube video, so yeah... i agree it looks like spam (i'll atleast purge the links out of it)
I'd say that characters like 💫 and 💰 are not considered typical text/database content.
(2022-11-09, 23:44)evantaur Wrote: [ -> ]It scrapes video description from this guys youtube video, so yeah... i agree it looks like spam (i'll atleast purge the links out of it)
Thanks. Smile
(2022-11-09, 23:47)Klojum Wrote: [ -> ]I'd say that characters like 💫 and 💰 are not considered typical text/database content.
Probably more standard than ➤

Seems that's the only video where he's using those so makes perfect sense it fails.
(2022-11-09, 23:54)Karellen Wrote: [ -> ]
(2022-11-09, 23:44)evantaur Wrote: [ -> ]It scrapes video description from this guys youtube video, so yeah... i agree it looks like spam (i'll atleast purge the links out of it)
Thanks. Smile
Should've used pastebin from the start, shouldn't post when tired
(2022-11-09, 23:56)evantaur Wrote: [ -> ]
(2022-11-09, 23:47)Klojum Wrote: [ -> ]I'd say that characters like 💫 and 💰 are not considered typical text/database content.
Probably more standard than ➤

Seems that's the only video where he's using those so makes perfect sense it fails.
Yeah, I had those suspicions earlier on too.  I guess there's not much I can do except for "cleaning" the nfo files of these weird characters being used, maybe some form of batch file so I can automate the process.

Its interesting that the local database doesn't seem to mind it though. I actually tried moving the local database onto my NAS and tried pointing to it with advancedsettings.xml but Kodi didn't like that and froze upon starting it. But I think I did that wrong, I didn't use path substitution...I might try that again tomorrow.