Jump to content

Recommended Posts

Posted
4 hours ago, Carlo said:

'm seeing quite a few errors being generated in your logs. Some of the worst are:

    SQLitePCL.pretty.SQLiteException: Constraint: FOREIGN KEY constraint failed
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.

This is likely corrupt or mismatched data from trying to fix your system previously.

Your best bet at this point is likely to remove Emby and it's files, then re-install fresh.

Hi @Carlo

 

Thanks for confirmation that just adding a directory at an existing library killed my system ! In that case I'm going to take time to think about it and perhaps give up on Emby because that's just too bad software sorry to say :(

Side question: it's an error in the library.db I guess ? isn't it possible to reset it ? just to avoid to have to recreate all users account !

 

Thanks

Posted

The problem is likely mis-matched data in your databases that's causing the REIGN KEY constraint errors.

It would be very difficult to try and manually fix this. The best method to get you back up and running would be to uninstall the server and remove it from the file system.
Then perform a new installation.

Posted
7 hours ago, Carlo said:

The problem is likely mis-matched data in your databases that's causing the REIGN KEY constraint errors.

It would be very difficult to try and manually fix this. The best method to get you back up and running would be to uninstall the server and remove it from the file system.
Then perform a new installation.

Thanks for details but how did it appear just by changing properties of a library ? there is a very serious issue/bug there no ?

Well I just deleted the library.db and redid the whole indexation of medias from scratch and will see how it goes... So far it runs perfect and Emby is lot faster than before !

  • Thanks 2
Posted

Just checking in with you.

Everything still working well?

Posted
19 minutes ago, Carlo said:

Just checking in with you.

Everything still working well?

Well so far so good, it is finishing currently to reindex all medias ;)

Is there an easy way to check regularly "health" of the database to detect any problems before they become a major issue ?

Posted
3 hours ago, Carlo said:

From this Knowledge Base article:
https://emby.media/support/articles/Corrupt-Database.html

Check the section Run Integrity Check.

Best bet is to make sure you have a good backup.
https://emby.media/support/articles/Backup.html?q=backup

Hope this helps,
Carlo

Yeah I had seen the article already about repair/maintenance of db but unhappy it can't be done in an automated way ! The idea would be to detect db issues at begin when it's easier and without lot less loss if you restore a backup ;) Perhaps a plugin to develop that would check regularly dbs are ok and reports if it notices any issue(s) ;)

For backup it has been setup but as it's not doing any tests on db you can backup a corrupted db without even knowing it :(

Side note: the bug on random play in music came back with the fresh db 😐

Posted

Detection maybe, but not try to fix it.
When attempting to fix a database you want exclusive access to the database with nothing else using it.

@LukeIt probably wouldn't be a bad idea to have a schedule task that runs "PRAGMA integrity_check" and if it doesn't receive an "OK" back to add this to the dashboard Alerts (maybe in red). A notification would be helpful as well.

  • Thanks 1
Posted
13 hours ago, Carlo said:

Detection maybe, but not try to fix it.
When attempting to fix a database you want exclusive access to the database with nothing else using it.

@LukeIt probably wouldn't be a bad idea to have a schedule task that runs "PRAGMA integrity_check" and if it doesn't receive an "OK" back to add this to the dashboard Alerts (maybe in red). A notification would be helpful as well.

Yeah of course and detection would be already well enough so you know something goes wrong and then can take proper steps to fix the problem before db is completely messed up 😄

 

Your suggestion for the "PRAGMA integrity_check" would be awesome (would need to be run against all db that Emby creates/uses) 😍

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...