"Plex Media Server was unable to open its media database" after forced 64bit install

Got notified that my plex was down. Went to the windows server and found that the PMS process wasnt running.
Used the shortcut to launch it, and it said it couldnt find the folder.

This is when I read that they are pushing automatic 64bit updates.

When launching PMS.exe from the new location, it says the database is corrupted. I tried a reboot and a re-install of the latest 64bit app but the issue remains. My databases are still in my localappdata…

image

Library is present. I even attempted to use one of the backups:

I’m not using Docker. Just a straight windows install.

Attaching log
Plex Media Server.log (4.3 KB)

Update. Tried to repair my database in which it was successful, but the same issue remains. I dont think its truly database corruption, more of a plex doesnt know where the database is thing. I dont know.
Any assistance would be appreciated.

Make sure that there aren’t any leftover Plex processes running when you start the 64bit version. CTRL-Shift-Esc to open the task manager and shoot them down.

Thanks for the reply. I did actually go ahead and do that. I even killed every other media service even if it had nothing to do with the 32bit plex.
As of the last writing I have also tried an uninstall and re-install of the 64bit. I made sure the program files\plex folder was completely gone before re-installing. Same issue. sigh

I restored a backup of my plex library file, and tried running again. This time in the logs I found this. It seems when the sql schema migration kicks off, it cant find a certain table and fails out:


Jun 17, 2024 14:25:20.138 [10804] INFO - Running migrations. (EPG 0)
Jun 17, 2024 14:25:20.138 [10804] ERROR - SQLITE3:0x73c5171, 1, no such table: schema_migrations in "select version from schema_migrations order by version"
Jun 17, 2024 14:25:20.138 [10804] ERROR - Database corruption: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version

Go back to the old server version, then repair your database.
Instead of typing all the commands manually, you can use the .bat or the .ps1 script from here PlexDBRepair/Windows at master · ChuckPa/PlexDBRepair · GitHub

If the latest database file is not repairable, go back and restore one of the backups https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/
Then repair that.

(If there are no backups, or the existing backups are months old, you’ll know for how long the corruption was already lurking in there.)

Thanks @OttoKerner

So last night I did something similar. I actually fully removed all pms versions x86 and x64, and restarted.

I then restored a backup of the databases folder from like 4 days ago.
I then installed an older version of the x86 PMS and that got it working again.
I turned off automatic updates and went to bed.

Will give repairing a try again today. Oh and that exact .ps1 script is what Ive been using.

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