mynttt / UpdateTool

A tool to update the IMDB ratings for Plex libraries that contain movies/series and use the IMDB agent to receive ratings
GNU General Public License v3.0
250 stars 12 forks source link

Database disk image is malformed #79

Closed devlinandrew closed 2 years ago

devlinandrew commented 2 years ago

Just set this up and get this error repeatedly in my logs, then the docker exits:

[INFO ] - 2021-12-11 08:57:54 @ ImdbDatabaseSupport.lambda$internalBatchUpdateOverPlexSqliteBinary$2: Error: near line 517: database disk image is malformed

I'm running on Unraid. What can I share here for more details? Thanks!

mynttt commented 2 years ago

Can you share the full log? Just make sure to remove your API Keys from it. You might use pastebin if it's too much.

devlinandrew commented 2 years ago

https://pastebin.com/f3qZmAj6

I truncated the movie section. There were 575 movies that needed to be changed.

mynttt commented 2 years ago

Looks like the database already had an issue before the tool has been used. What happens when you run this command via the sqlite3 binary? pragma integrity_check;

devlinandrew commented 2 years ago

Interesting...how do I run that? Plex docker console, something like > sqlite3 pragma integrity_check ?

devlinandrew commented 2 years ago

Yikes, my Plex server just crashed due to a corrupted DB. Had to restore from backup.

Starting Plex Media Server. Error: Unable to set up server: sqlite3_statement_backend::loadOne: database disk image is malformed (N4soci10soci_errorE)

Hoping that it wasn't corrupted from the update tool! Gonna step back from using this for now.

mynttt commented 2 years ago

@devlinandrew There have been three to four reports regarding corrupted databases but there has been no lead on why that happens until now. I suspect that a very tiny percentage of the plex database have some previous corruption with them already that for some reason causes such issues.

If you want me to investigate this you could send me your database and name your Plex version. Until that is done it probably does not make much sense to use the tool.

devlinandrew commented 2 years ago

Thanks, I appreciate the offer. I have deleted the corrupted DB so I don't have anything left to share.