Corrupt Database but marked OK by DBRepair

Server Version#: 1.42.2.10156-f737b826c

I have a corrupt database on my Plex server, but no circumstances changed to warrant the corruption. The server hardware did not lose power, and there was not an antivirus program scanning the Plex data directory. I know the database is corrupt because I’m receiving SQLite errors when attempting to add media or refresh a library. I’ve tried using the DBRepair program, but it reports the database as OK. Even following the official documentation https://support.plex.tv/articles/repair-a-corrupted-database/ didn’t fare any better. My scheduled task for database backups was working and I attempted to restore from backup but received the same errors on those backup databases as well. Is there anything I can do to recover my database or do I have to start fresh? I can’t attach the database file here but can upload it to cloud storage if needed.

Plex Media Server.log (447.3 KB)

So you have tried Chuckpa database utility

Yes, I have. v1.13.01 of DBRepair.sh.

What errors are you seeing?

The log file you attached shows no database errors.

Log entries for db issues will be ERROR entries and mention that the database is corrupt or malformed.

Example:

Oct 20, 2019 10:25:27.220 [0x7fdc47447700] ERROR - SQLITE3:(nil), 11, database corruption at line 64817 of [bf8c1b2b7a]

The log file does show a lot of database migration entries.

The migration entries are normal if you loaded a backup database that was created with an earlier version of Plex Media Server.

However, if you are updating/downgrading between Plex versions, then suggest you stop doing so, as that can cause problems. Stay on 1.42.2.10156, the current public release.

In the log file you attached, the server was stopped before it had completely started. The db migrations can take several minutes to complete, and the server will be unavailable during that time. You may see a “503 maintenance” message in Plex Web during the db migration. That message is normal and does not necessarily indicate a db problem.

DBRepair checks for structural problems in the database. It cannot repair problems with content.

If there are content problems then you may have to dump the db and start over.

Nov 19, 2025 19:10:38.874 [0x16fbcb000] ERROR - SQLITE3:0x14102dee0, 267, statement aborts at 214: [INSERT INTO metadata_items (`library_section_id`,`parent_id`,`metadata_type`,`guid`,`edition_title`,`slug`,`hash`,`media_item_count`,`title`,`title_sort`,`original_title`,`studio`,`rating`,`audience_rating`,`rating_count`,`tagline`,`summary`,`content_rating`,`content_rating_age`,`is_adult`,`index`,`absolute_index`,`duration`,`metadata_agent_provider_group_id`,`user_thumb_url`,`user_art_url`,`user_banner_url`,`user_clear_logo_url`,`user_music_url`,`user_fields`,`originally_available_at`,`available_at`,`expires_at`,`refreshed_at`,`year`,`added_at`,`created_at`,`updated_at`,`changed_at`,`resources_changed_at`,`tags_genre`,`tags_collection`,`tags_director`,`tags_writer`,`tags_star`,`deleted_at`,`tags_country`,`extra_data`) VALUES (:U1,
Nov 19, 2025 19:10:38.874 [0x16fbcb000] ERROR - Exception inside transaction (inside=1) (/System/Volumes/Data/data/actions-runner/_work/plex-media-server/plex-media-server/Library/MetadataItem.cpp:1154): std::exception
Nov 19, 2025 19:10:38.874 [0x16fbcb000] ERROR - Exception inside transaction (inside=1) (/System/Volumes/Data/data/actions-runner/_work/plex-media-server/plex-media-server/Library/MetadataItem.cpp:4005): std::exception
Nov 19, 2025 19:10:38.874 [0x16fbcb000] ERROR - Exception assimilating media item in Various Artists/Chillhop Space Jazz: std::exception

This is an example of an error I receive when scanning for new media. Is this a benign error?

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