Database Corruption After Update

Just updated to 1.26.0.5715 from the linuxserver/docker-plex image and now it looks like the database is corrupt. Getting the below errors in the Plex Media Server.log files. Haven’t an issue with corrupt SQL databases for the 1.5 years I’ve had this system up (unlike my previous pre-built terramaster which was failing every other week).

Apr 29, 2022 03:37:12.686 [0x7f56c19d1d48] ERROR - SQLITE3:0x80000001, 779, index corruption at line 91877 of [1b256d97b5]
Apr 29, 2022 03:37:12.686 [0x7f56c19d1d48] ERROR - SQLITE3:0x80000001, 779, statement aborts at 254: [update metadata_items set originally_available_at = iif(typeof(originally_available_at) in (‘integer’, ‘real’), originally_available_at, strftime(’%s’, originally_available_at)), avai
Apr 29, 2022 03:37:12.765 [0x7f56c19d1d48] ERROR - Exception inside transaction (inside=1) (/data/jenkins/server/3529576666/Library/DatabaseMigrations.cpp:237): sqlite3_statement_backend::loadOne: database disk image is malformed
Apr 29, 2022 03:37:12.788 [0x7f56c19d1d48] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

Continuing the discussion from Plex Media Server:

Did you attempt to repair the database following the instructions provided by Plex?

I haven’t yet. So that only includes the command prompt inputs but doesn’t have the unix/mac inputs, only some blurb like “The commands for macOS and Linux/NAS devices are similar to the Windows instructions above and would be performed using the Terminal/command line on those systems”. The older version of the database repair has both full set of commands. Gotta install sqlite3 tools since I can’t find the sqlite3 tool to run the PRAGMA check to check for corruption.

The previous version of that corrupt database doc was much better than this new one lol

"C:\Program Files (x86)\Plex\Plex Media Server\Plex SQLite.exe" com.plexapp.plugins.library.db "PRAGMA integrity_check"

Okay, found another thread after trying to figure this out. https://forums.plex.tv/t/database-repair-error-no-such-collation-sequence-icu-root/715808/6 which helped. I had to open the container shell within portainer, and run the sqlite commands from within the container.

I had to run repair to .dump and rebuild. which worked. Agree with the people in that thread, documentation should definitely be updated.

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