Can't upgrade PMS past 1.32.0.6973

Server Version#: 1.32.0.6973

If I do any update after 1.32.0.6973, PMS won’t load. If I rollback to 1.32.0.6973 it works fine. I can visibly see a white window “Updating Database” and then it closes shutting down PMS. I’ve gone through logs but can’t find anything that I can decipher. I did rename my Plexdata folder once and PMS loaded as a new install. Once I renamed the folder back I got the same issue. Any suggestions would be welcome and appreciated.

Windows 11 x64 machine.

Please provide the logs, it might be database corruption.

Could you provide which specific log would tell you this info? There are many in different ones in the logs folder.

Also, wouldn’t a corrupt database cause this for all versions of PMS? Why does the stated older version work fine?

All of them. Zip the Logs folder and upload the zip file to the thread.

There are levels of corruption. Plex can still run with a slightly corrupt database, but an upgrade might fail because it cannot update the db schema.

I have logs from 2019-2023 and the folder size is 1.90 GB. I can’t see any large files so I can’t see why it is so big other than just the sheer number of logs. Is it safe to say delete all logs 2019-2022 and then zip only 2023 logs?

Dang. The log directory on my system is ~25MB.

They should wrap automatically, keeping just six of each file (current plus five rollovers).

If you want, you can just zip up Plex Media Server.log to Plex Media Server.5.log.

You can delete the earlier logs.

BTW, if you want to look for database corruption, look in Plex Media Server.log (and .1.log, etc) for ERROR entries that mention a corrupt or malformed database.

I found “Malformed” 3 times on my Plex Media Server Log-1. It didn’t find it on the other ones. Is this a situation where I need to rebuild the database with SQLite? I have done that once before for another program and it finally worked.

I found the article from Plex on how to test and repair the database with the SQLite version included with PMS. I will give that a shot following their instructions.

https://support.plex.tv/articles/repair-a-corrupted-database/

You can also use the PlexDBRepair Utility.

Download the bat file and run it from the c:\ prompt.

It look for Plex executables and database in the default locations. You’ll need to edit the bat file if things are in a different place. It makes backup copies, so you can restore if needed.

2 Likes

My Plex Data folder is on a separate SSD drive E:

I tried reading through the BAT file and can’t find where I’d edit my database location. Could you point me in the right direction?

REM These assume PMS is in the default location
set "PlexData=%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases" 
set "PlexSQL=%PROGRAMFILES%\Plex\Plex Media Server\Plex SQLite"

Edit the second of these lines like
set "PlexData=E:\FOLDERNAME\Plex Media Server\Plug-in Support\Databases"
You can also copy the path from the address bar of the Windows file explorer after you have navigated to the database folder.

1 Like

I copied that code from the github page into a notepad. Edited the location and then saved the file as a BAT file. I really feel like an idiot, but how do I execute this BAT file. I tried running as Admin and using Terminal in Admin mode but nothing works. There isn’t any Windows support at all on the PlexDBRepair Utility github page.

.bat files are run with a double click.

If you can’t see any messages because the command prompt window is closed immediately, open one manually with Win+R cmd
Google how to navigate on the command prompt.

Run it from the c:\ prompt to see the output onscreen. No need to run as admin.

It also creates the PlexDBRepair.log file in the Databases folder.

c:\Temp>DBRepair.bat
14:33:02.73 --  ====== Session begins. (Thu 07/13/2023) ======
14:33:02.97 --  Exporting Main DB
14:33:21.19 --  Exporting Blobs DB
14:33:30.91 --  Exporting Complete.
14:33:30.91 --  Creating Main DB
14:33:38.16 --  Verifying Main DB
14:33:40.26 --  Main DB verification check is: ok
14:33:40.26 --  Main DB verification successful.
14:33:40.26 --  Creating Blobs DB
14:33:41.80 --  Verifying Blobs DB
14:33:41.94 --  Blobs DB verification check is: ok
14:33:41.94 --  Blobs DB verification successful.
14:33:41.94 --  Import and verification complete.
14:33:41.95 --  Reindexing Main DB
14:33:43.73 --  Reindexing Blobs DB
14:33:43.92 --  Reindexing complete.
14:33:43.92 --  Moving current DBs to DBTMP and making new databases active
        1 file(s) moved.
        1 file(s) moved.
        1 file(s) moved.
        1 file(s) moved.
14:33:43.94 --  Database repair/rebuild/reindex completed.
14:33:43.94 --  ====== Session completed. ======

I ran the PlexDBRepair tool and was able to upgrade my PMS. Thank you guys for all of your help. I really appreciate it.

1 Like

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