Server Version#: Plex Media Server v1.43.1.10576-06378
Player Version#: N/A
After upgrading to the latest version of Plex Media Server, the application fails to migrate the database and a corrupt database error message pops up. I went through the database validation steps using SqlLite3 and ensured the database itself was healthy. Rolling back to the previous version allows the application to start normally.
The log seems to indicate a malformed JSON in the query.
Apr 08, 2026 11:53:03.769 [14412] WARN - [CERT/OCSP] getCertInfo failed; skipping stapling
Apr 08, 2026 11:53:03.771 [14412] INFO - Running migrations. (EPG 0)
Apr 08, 2026 11:53:03.803 [14412] INFO - Running forward migration 202601121053.
Apr 08, 2026 11:53:05.050 [14412] ERROR - SQLITE3:(nil), 1, statement aborts at 19: [select distinct metadata_items.id, metadata_items.extra_data from media_items join media_streams on media_items.id=media_streams.media_item_id join metadata_items on metadata_items.id=media_items.metadata_item_id where media_streams.stream_type_id = 1 and ifnull(media_streams.extra_data ->> ‘ma:orientation’, ‘0’) in (‘6’, ‘8’)] malformed JSON
I wrestled with it for a while and then just restored the whole drive from Monday’s backup. I’m very glad that I put the server on a separate NUC and that’s the only thing on it.
Please be careful which SQLlite tool you are using. Plex uses a custom version bundled with plex that will get corrupt if you use regular SQLLite.
Also, after restoring did you use Chuck’s script to repair the database, and attempt upgrading again? Often times database corruption is only discovered during the upgrade process due to the initial damage being isolated to a rarely used part of the database.
I found a database row which had malformed JSON in the database which was causing our database migration to fail. I’m not sure exactly why that one row is bad but for now we’ll just do an extra check to ensure the json is valid before running the migration.
I woke up to my docker container having automatically upgraded and emails telling me that it had failed to start properly.
Tried to restore a backup from before the upgrade (I’ve never had to do it in UnRaid - said it was successfull but the container still claimed to be up to date!)
Hit up Gemini with the errors, ran a few suggested things and it started to work for me!
I am running on 1.43.1.10576 now and all seems to be okay.
It looks like it was more a permissions issue that anything else!
This is what fixed it for me -
# Reset ownership for the Unraid ‘nobody’ user (99) and ‘users’ group (100)
chown -R 99:100 /mnt/cache/appdata/plex