Since latest update "Something Went Wrong"

Server Version#: 1.26.1.5772-872b93b91
Player Version#: 4.80
Since the latest all the my libraries now show this error message.
Saw something in the log file that suggested DB corruption and followed the KB article to repair a corrupt database both automatically and manually but I see the same error.
Running the DB check command returns the message OK but looking at the logs I still see:

ERROR - SQLITE3:0x7e10a099, 11, database corruption at line 81887 of [1b256d97b5]
ERROR - SQLITE3:0x7e10a099, 11, statement aborts at 25: [delete from metadata_relations where metadata_relations.related_metadata_item_id in (select metadata_items.id from metadata_items where metadata_items.guid in (select guid from (select
ERROR - Exception inside transaction (inside=1) (E:\jenkins\server\3578859791\Library\DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: database disk image is malformed
ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

Plex Media Server Logs_2022-04-28_19-38-03.zip (2.0 MB)

I recently (although it has been working for over a month) migrated a number of my libraries to PCLOUD (Cloud Storage) although some libraries are still local and both.

This only happened after the recent update to 1.26.1.5772 :frowning:

Help!

Broken database 4 sure

As the article mentions, regardless of check, try and do a manual repair

Thanks Dane I did try the manual method but that hasn’t worked.

I’ve copied the corrupt database to a different folder and am currently recreating my libraries.

Annoyingly my backup folder was the same as my DB folder (not sure if thats right) and when I followed the restore a backed up DB some of the files mentioned were missing… specifically I was expecting to see a library.db-DATE file as well as a blobs.db-DATE file, but only the library.blobs.db-DATE file existed… The restore steps then didn’t make sense as I didn’t have a library.db-DATE file to rename as the recovered DB

When a corruption is detected, PMS will no longer make backups, to avoid rolling over a valid database backup

So if no backup files was ever made for the database, are you then sure it’s enabled?

Ah right OK… makes sense, thanks

Yep, definitely have that set… and I have created a BACKUP folder within DATABASES to create backups and set that in Settings as the backup location.

Thanks for your help… library scanning is going to take a while from the cloud but it is what it is :slight_smile:

1 Like

Might wanna set up alarming:

1 Like

I recommend you to clear out the input field for the backup location. Thus, resetting it back to the default.
Because: if the folder is for some reason not accessible, the backup fails.
So that is worse than having a backup directly inside the database folder.

2 Likes

Me as well wants to recommend something :slight_smile:

After changing/updating the path, you can check if it works using this 3. Party tool

1 Like

Plex Database Repair (MAC)

cd /Users/HOME/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases

Check

“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “PRAGMA integrity_check”

Dump

“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “.output dump.sql” “.dump”

Make a backup copy and delete com.plexapp.plugins.library.db

Open the dump.sql file with an editor and look for corruption you’ll see a line like “CORRUPTION ERROR” with a bunch of **** around it. you can delete all the lines you find, change the very bottom from “rollback” to “commit”, and save.

“/Applications/Plex Media Server.app/Contents/MacOS/Plex SQLite” com.plexapp.plugins.library.db “.read dump.sql”

Done.

As the last option, it should work

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.