Solved Episode Count wrong - Database cleanup error - CVideoDatabase::CleanDatabase failed
#1
I have a MySQL database that is used by multiple clients, I scrape with Windows and have noticed a strange issue...

When viewing TV Shows the episode count will only increase, and never decrease. That is to say, if I add ten episodes to a show, I will see ten un-watched episodes. As I watch them and delete them, that number never decreases, it will only increase. So if after adding ten shows and scraping.. Then watching them and deleting them from the NAS, AND re-scraping and cleaning the database... There will be no episodes in the folder (Where these used to be ten) yet I will see 10 new shows in the episode count. I have scraped from Windows, AppleTV and Linux all with the same result. I have even started a brand new database and it exhibited the same behavior...

I suspect something is wrong with my MySQL, but I am not sure where to start looking.

Everything else is fine, I see the correct episodes when i drill down int the folder (but the count in Media View is always wrong) and all of my resume points and such work perfectly.

In a debug log i also see a clean up failed message:
Reply
#2
Update - Possible Fix

So... I seem to have fixed this issue by increasing the Thread_Stack from 128k to 256k in the MySQL my.conf file.

This was suggested by someone else having library issues with music and also using a Synology NAS. Looks to me like the default Synology settings are a little too conservative to run a big XBMC Library. Most things work, but I am guessing there is some recursive logic at the end of a clean up that updates episode counts and that can fail making the library basically functional, but not totally up to date.

Changing the settings made the library work going forward, but things that were already wrong continued to be wrong. That is to say, if an episode count was wrong, adding a show would increment it up and deleting a show would now increment it down, but it would always be off by however much it was in error prior to the fix... I fully resolved the issue by creating a new database and starting over. Now show counts are correct and I no longer have the MySQL error in the logs. AND... I think things are much faster...

So if you have a Synology NAS, you may want to to look at the /etc/my.conf file and change the value for Thread_Stack

You need to enable telnet and then SSH into the NAS using the login ROOT and whatever you set for your admin password. Only root can edit the file and save it. VI is the only installed text editor... so good luck!
Reply

Logout Mark Read Team Forum Stats Members Help
Episode Count wrong - Database cleanup error - CVideoDatabase::CleanDatabase failed0