PMS stopped working after update to latest Plex Pass beta

Description:
I updated PMS today to the latest Plex Pass beta release (1.28.2.6106) and since then my media does not show up.

Server version: 1.28.2.6106 (running on Windows Server)
Browser: Edge 104 and 105

Steps to reproduce:
Restart server
Navigate to any media library (e.g. “Movies” or “TV shows”)
Error page saying “Something went wrong. An unexpected error occurred. Retry”
This happens both via localhost and via app.plex.tv.

Actions taken so far:
I’ve tried downloading the update again and done a repair.
Restarted the server, my router and verfied that my remote port is open.
Installed all available updates for my server (via Windows Update).
I’ve tried “clean bundles” and “optimize database”.
Server has been working for many years without any big issues.

Logs:
Plex Media Server Logs_2022-08-21_18-27-33.zip (1.4 MB)

Windows event log:
Log Name: Application
Source: Application Error
Date: 2022-08-21 18:08:49
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
*Computer: ***********
Description:
Faulting application name: Plex Media Server.exe, version: 1.28.2.6106, time stamp: 0x62fe5ee5
Faulting module name: ucrtbase.DLL, version: 10.0.14393.2990, time stamp: 0x5caeb859
Exception code: 0xc0000409
Fault offset: 0x000884cb
Faulting process id: 0x524
Faulting application start time: 0x01d8b5760772bf74
Faulting application path: C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe
Faulting module path: C:\Windows\SYSTEM32\ucrtbase.DLL
Report Id: 8a510162-216b-11ed-96e4-e0cb4ec6307b
*Faulting package full name: *
Faulting package-relative application ID:

The database of your Plex Media Server is corrupt.

From Plex Media Server.1.log:

Aug 21, 2022 17:53:05.760 [1320] ERROR - SQLITE3:0x5d9c4a14, 11, statement aborts at 3263: [ANALYZE] database disk image is malformed
Aug 21, 2022 17:53:05.839 [1320] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed

You’ve three choices:

  1. Repair
  2. Restore from backup
  3. Delete & start over.

To repair, see Repair a Corrupted Database.

If repair fails, you can try restoring from a backup. See Restore a Database Backed Up via ‘Scheduled Tasks’. You may want to check the backup versions for corruption, as it is not possible to tell when the original corruption occurred.

If the database cannot be repaired or restored, then you will have to delete it and start over. See the “Repair…” article for additional information (basically, stop Plex, make a backup of the Databases folder, delete everything in the Databases folder, start Plex). You will have to re-create all libraries and re-share with any friends. Your media files are not affected.

So did the latest PMS update cause this? :confused: This server has been running PMS for 10+ years, without corrupting the database. I update PMS manually on the server every few weeks. Never seen this before.

The latest com.plexapp.plugins.library.db automatic backup seems to be from February :unamused:
There’s a com.plexapp.plugins.library.blobs.db automatic backup from yesterday. What’s the difference between these two files?

No, it just exposed the issue. Since your last failed backup was February I suspect that’s when the actual corruption took place.

library.blobs.db and library.db hold different metadata. Plex moves a lot of data out of the primary library database in order to keep it reasonable. The Blobs database tends to store the large excepts of text in descriptions and other larger values that are not the “metadata” that plex uses as a backbone.

I would reference the repair database option listed above.

Well, it’s worked perfectly since then, through many server updates etc, without any warnings. What’s changed in this latest update? Seems like a step back…

If it’s been corrupt since Feb without any warnings or working backups… That’s really bad.

All SQLite commands result in “database disk image is malformed”.
Trying the low-level recovery now but it’s displaying thousands of warning/error messages…

The database worked 100% until this PMS update :confused:
Maybe I should just install an old PMS version and not update again…

After recovery there are now 0 libraries on the server…

Any more ideas? This server and database holds 10+ years of movies, tv shows and music… If it’s gone I’ll probably give up with Plex.

Feel free to zip the damaged database (The original one) and upload it to like Google Drive or DropBox

Then DM me the link, and I’ll take a look

Thank you @dane22!

I’ve sent you a download link.
The zip contains the library.db and library.blobs.db files, copied before my recovery attempt.

I’ve DM’ed you a download link to what I hope is a repaired database…

Do the following:

  • Stop PMS
  • Make a backup of your database directory
  • Delete the following if present:
    • com.plexapp.plugins.library.db
    • com.plexapp.plugins.library.db-shm
    • com.plexapp.plugins.library.db-wal
    • com.plexapp.plugins.library.blobs.db
    • com.plexapp.plugins.library.blobs.db-shm
    • com.plexapp.plugins.library.blobs.db-wal
  • Copy back in the two databases I DM’ed you
  • Start PMS again, and wait for 2 min
  • Check access to PMS works, and that you can see your libraries
  • Refresh/Scan all libraries one by one

I followed your instructions but the server still shows 0 libraries.
There are two entries for the server, one unavailable (with the libraries also unavailable) and one available with 0 libraries.
Screenshot 2022-08-21 224402

Anything else I can try?

Strange, since I see this with your database loaded:

So there’s something you are not telling us here, since I know for a fact the database is now working!

So what else did you try?

Huh? See my original post.

Actions taken so far:
I’ve tried downloading the update again and done a repair.
Restarted the server, my router and verfied that my remote port is open.
Installed all available updates for my server (via Windows Update).
I’ve tried “clean bundles” and “optimize database”.

I tried recovering the database, following this guide. When that didn’t work I went back to the original db files. The same I sent you.
After I got the files back from you I followed your instructions, nothing else.

Other than that, all I’ve done is a few more restarts.

And adding to self here…

I looked up your account, and noticed, that you in your desperation did remove server?

Edit: Or the server did that itself, due to a new empty database

So try this:

No, I haven’t removed the server.
There was a popup once, that said my server couldn’t be contacted securely, so I changed setting from require SSL to prefer. And then back again, since it didn’t change anything.

There is only one server (my server) on that page.

I’m not locked out of the settings. But the libraries are gone (after the recovery).

Well, shame on me for editing my post while you where typing, sorry…

But do try what I outlined, since that would delete both servers from plex.tv, and when editing the registry keys mentioned in the article, server would be unclaimed and then simply needs to be reclaimed

Removed it (as there was only one server), changed the registry and reclaimed the server. But the result is the same. Two servers visible, but only one available with 0 libraries.

Edit: And my family sharing setup is now gone :confused:

I deleted them in our system, so please close browser, and start it up again

Also restart PMS first

Same result, via localhost on my server.

Via app.plex.tv I can’t see any server now.

You need local only for claiming!

And you did remove the registry keys mentioned?
Your IP Net is Private address space?
You are on the same IP Net as the PMS?

And if yes to all above, please try in an Incognito browser tab

After a reboot of my server the “correct” server is available again, with the libraries :slight_smile: But there’s still another server (same name) that shows up as unavailable.
This is with a browser on my server, via localhost.
Via app.plex.tv and my Plex apps it looks good now, only one server with my libraries.

Thank you for your help :slight_smile:
Is there anything else I should do? To prevent this from happening again?
Should the database be automatically backed up to the same directory? (that hasn’t worked for a while)

1 Like