# Corrupted Database Upon Upgrade

**URL:** <https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827>\
**Category:** Plex Media Server\
**Tags:** server-windows\
**Created:** [April 8, 2026, 7:50pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827 "2026-04-08T19:50:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbhanu](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@hbhanu](https://forums.plex.tv/u/hbhanu)\
**Post date:** [April 8, 2026, 7:50pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/1 "2026-04-08T19:50:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jtnovo](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jtnovo](https://forums.plex.tv/u/jtnovo)\
**Post date:** [April 8, 2026, 7:59pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/2 "2026-04-08T19:59:42Z")

</div>

I am having the same issue on Windows 11 and upgrading to v1.43.1.10576-06378. Rolling back to 1.43.0.10492 and it is able to launch.

---

<div class="post-metadata">

**Author:** ![clunkclunk](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/clunkclunk/32/58_2.png) [@clunkclunk](https://forums.plex.tv/u/clunkclunk)\
**Post date:** [April 8, 2026, 8:37pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/3 "2026-04-08T20:37:13Z")

</div>

I also have the same issue on unRAID, running PMS in a linuxserver docker container. Intel iGPU for hardware transcoding.

Manually validating the sqlitedb and using ChuckPA’s DBRepair util did not detect any issues.

Reverting to 1.43.0, using the same database, everything operates normally.

---

<div class="post-metadata">

**Author:** ![mitcham](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mitcham](https://forums.plex.tv/u/mitcham)\
**Post date:** [April 8, 2026, 10:18pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/4 "2026-04-08T22:18:13Z")

</div>

Same issue on unraid database malformed after the update had to restore a previous database as repair couldn’t fix it

---

<div class="post-metadata">

**Author:** ![tsigwing](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tsigwing](https://forums.plex.tv/u/tsigwing)\
**Post date:** [April 8, 2026, 10:19pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/5 "2026-04-08T22:19:45Z")

</div>

so…if I upgraded to the latest version and DON”T get an error, then it should be a ok?

---

<div class="post-metadata">

**Author:** ![Jim1701](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jim1701/32/293519_2.png) [@Jim1701](https://forums.plex.tv/u/Jim1701)\
**Post date:** [April 8, 2026, 10:55pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/6 "2026-04-08T22:55:28Z")

</div>

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.

Looking forward to the fixed version.

---

<div class="post-metadata">

**Author:** ![atomizer123](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@atomizer123](https://forums.plex.tv/u/atomizer123)\
**Post date:** [April 8, 2026, 11:05pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/7 "2026-04-08T23:05:55Z")

</div>

Same issue on Windows. Tried fixing the database but that did not help. Had to reinstall the previous version to get it running.

---

<div class="post-metadata">

**Author:** ![Atomatth](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/atomatth/32/314355_2.png) [@Atomatth](https://forums.plex.tv/u/Atomatth)\
**Post date:** [April 8, 2026, 11:49pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/8 "2026-04-08T23:49:06Z")

</div>

If you’re seeing this issue please download your logs (the entire zip) and share them here or with me.

---

<div class="post-metadata">

**Author:** ![dbirch](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dbirch](https://forums.plex.tv/u/dbirch)\
**Post date:** [April 9, 2026, 1:18am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/9 "2026-04-09T01:18:28Z")

</div>

> [@hbhanu](#):
>
> using SqlLite3

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](https://support.plex.tv/articles/repair-a-corrupted-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.

---

<div class="post-metadata">

**Author:** ![the\_plex](https://avatars.discourse-cdn.com/v4/letter/t/ac8455/32.png) [@the\_plex](https://forums.plex.tv/u/the_plex)\
**Post date:** [April 9, 2026, 5:30am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/11 "2026-04-09T05:30:24Z")

</div>

Update pms before 30 minutes- no issues. Windows server 2025

---

<div class="post-metadata">

**Author:** ![pommesmatte](https://avatars.discourse-cdn.com/v4/letter/p/3e96dc/32.png) [@pommesmatte](https://forums.plex.tv/u/pommesmatte)\
**Post date:** [April 9, 2026, 6:27am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/12 "2026-04-09T06:27:34Z")

</div>

> [@dbirch](#):
>
> 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.

Hmm, that’s good to know. I sometimes change media paths via SQLite editor. Up until now I never had a problem with that.

---

<div class="post-metadata">

**Author:** ![drzoidberg33](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drzoidberg33/32/4184_2.png) [@drzoidberg33](https://forums.plex.tv/u/drzoidberg33)\
**Post date:** [April 9, 2026, 8:49am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/13 "2026-04-09T08:49:24Z")

</div>

Can somebody provide me with a copy of their database? I’ll open my DMs.

---

<div class="post-metadata">

**Author:** ![CooLeRRS](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@CooLeRRS](https://forums.plex.tv/u/CooLeRRS)\
**Post date:** [April 9, 2026, 8:51am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/14 "2026-04-09T08:51:34Z")

</div>

The same error on Synology NAS. And the server doesn’t allow me to roll back to the previous version, it says that a more recent version is installed.

> ERROR - SQLITE3:0x80000001, 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\_it  
> em\_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  
> Apr 09, 2026 10:25:55.585 [140122768587408] ERROR - Exception inside transaction (inside=1) (/home/runner/\_work/plex-media-server/plex-media-server/Library/DatabaseMigrations.cpp:342): sqlite3\_statement\_backend::loadRS: malformed JSON  
> Apr 09, 2026 10:25:55.587 [140122768587408] ERROR - Exception thrown during migrations, aborting: sqlite3\_statement\_backend::loadRS: malformed JSON  
> Apr 09, 2026 10:25:55.587 [140122768587408] ERROR - Database corruption: sqlite3\_statement\_backend::loadRS: malformed JSON  
> Apr 09, 2026 10:25:55.587 [140122768587408] ERROR - Error: Unable to set up server: sqlite3\_statement\_backend::loadRS: malformed JSON (N4soci10soci\_errorE)

---

<div class="post-metadata">

**Author:** ![mitcham](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mitcham](https://forums.plex.tv/u/mitcham)\
**Post date:** [April 9, 2026, 9:24am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/15 "2026-04-09T09:24:08Z")

</div>

I have my restored database I can send if that helps…

---

<div class="post-metadata">

**Author:** ![drzoidberg33](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drzoidberg33/32/4184_2.png) [@drzoidberg33](https://forums.plex.tv/u/drzoidberg33)\
**Post date:** [April 9, 2026, 9:24am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/16 "2026-04-09T09:24:10Z")

</div>

Thanks @brunix86 for 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’ll update here when the fix is pushed out.

---

<div class="post-metadata">

**Author:** ![drzoidberg33](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/drzoidberg33/32/4184_2.png) [@drzoidberg33](https://forums.plex.tv/u/drzoidberg33)\
**Post date:** [April 9, 2026, 9:24am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/17 "2026-04-09T09:24:27Z")

</div>

No worries, have already received one from another user.

---

<div class="post-metadata">

**Author:** ![mitcham](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mitcham](https://forums.plex.tv/u/mitcham)\
**Post date:** [April 9, 2026, 9:24am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/18 "2026-04-09T09:24:40Z")

</div>

No problem

---

<div class="post-metadata">

**Author:** ![PieOPah](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@PieOPah](https://forums.plex.tv/u/PieOPah)\
**Post date:** [April 9, 2026, 9:49am UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/19 "2026-04-09T09:49:05Z")

</div>

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

# Set permissions so the container can write

chmod -R 777 /mnt/cache/appdata/plex

---

<div class="post-metadata">

**Author:** ![hbhanu](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@hbhanu](https://forums.plex.tv/u/hbhanu)\
**Post date:** [April 9, 2026, 12:12pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/20 "2026-04-09T12:12:06Z")

</div>

I appreciate you checking - yeah, I had followed the Plex documentation for repairing a corrupt database as well as the Powershell variant from [https://github.com/ChuckPa/DBRepair/tree/master/Windows](https://github.com/ChuckPa/DBRepair/tree/master/Windows)

---

<div class="post-metadata">

**Author:** ![akkbar](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@akkbar](https://forums.plex.tv/u/akkbar)\
**Post date:** [April 9, 2026, 5:36pm UTC](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827/21 "2026-04-09T17:36:11Z")

</div>

So… how would we see if this is happening to our install of PMS?

[Next page](https://forums.plex.tv/t/corrupted-database-upon-upgrade/937827.md?page=2)
