Server Version#:1.28.1.6018 32 bit
Player Version#
I don’t know what is happening. This all started after I added a new movie which went fine but I then went to update the server to the latest version and it got stuck and kept saying to retry. It didn’t work so I closed PMS and restarted it but to have it do what I mentioned in the subject heading. The icon is in the Taskbar but immediately disappears when my mouse goes over it. The PMS service is running in the task manager. I don’t know how to give you logs. Please advise.
Normally, go to Settings → Troubleshooting to download server log files.
However, it appears like you can’t do that due to Plex crashing.
Instead, go to %LOCALAPPDATA%\Plex Media Server\
, zip/compress the Logs directory and attach the zip file to this the thread (%LOCALAPPDATA%
= C:\Users\user_name\AppData\Local).
To attach a file to a the thread, just drag it into the message window. It will insert at the cursor location.
Where is the thread you mention?
This conversation
Plex Logs 8-5-2022.zip (2.1 MB)
I hope this is what you need.
Yeah, that could have been better written. Fixed.
Thanks for the files.
A question, and a problem:
Plex Data Folder Location
What is the J
drive? Moving the Plex data folder is perfectly OK. Just a note that the drive must be NTFS format, not exFAT/ReFS/etc, and not a network drive.
Plex Database Corruption
This is the cause of your problems. The database is corrupt.
From Plex Media Server.log
:
Aug 05, 2022 18:53:01.617 [3004] ERROR - SQLITE3:0x8705ea07, 11, database corruption at line 88814 of [1b256d97b5]
Aug 05, 2022 18:53:01.617 [3004] ERROR - SQLITE3:0x8705ea07, 11, statement aborts at 3161: [ANALYZE] database disk image is malformed
Aug 05, 2022 18:53:01.621 [3004] ERROR - Exception thrown during migrations, aborting: sqlite3_statement_backend::loadOne: database disk image is malformed
You’ve three options:
- Repair
- Restore from a backup
- Delete it and start over.
Repair: Plex Documentation → Repair a Corrupted Database
If repair fails, try Restore a Database Backed Up via ‘Scheduled Tasks’ .
You should check the backups for corruption as well, using the procedure in the “Repair…” document. The log files only cover Aug 5th, so it is not possible to tell when the corruption occurred. If corrupted, you might be able to repair one of the backups (there are degrees of corruption, and one of the the backups may be less corrupted than the main db).
After restoring from a backup, scan all libraries. This will pick up any changes since the backup was taken.
If neither repair nor restore works, then delete the database as mentioned in the “Repair…” support document. You will have to re-create your libraries and re-share them with any friends. Your media files will not be touched.
I never used the C drive as it was too small when I first started using Plex years ago. So my J drive is where Plex is installed. My C drive is now very large but I don’t know how to use it for Plex now since PMS is all on J. I would like to do this but need guidance.
Also, I did look at the fixing a corrupt database article but I don’t understand how to use sqlite. Again more guidance needed. I looked at the backups and I do see db backups but the dates for db and blobs are different dates. This is contrary to the Plex article examples. Please advise. Thank you!
See if you can repair the main database first. Worry about the backups only if needed. We can move things to the c:
drive later.
-
Stop Plex Media Server.
-
Make a backup copy of the Plex database directory,
J:\PlexMs\Plex Media Server\Plug-in Support\Databases.
-
Go to the database directory:
cd J:\PlexMs\Plex Media Server\Plug-in Support\Databases
-
If they exist, delete any -shm and -wal files.
-
Open the database file. The Plex SQLite executable is in the same directory as Plex Media Server.exe.
cd J:\PlexMs\Plex Media Server\Plug-in Support\Databases
"J:\PlexMS\Plex Media Server\Plex SQLite" com.plexapp.plugins.library.db
- You can now issue the PRAGMA, VACUUM, & REINDEX commands as listed in the support document. Be sure to include the semi-colon. The commands will not execute without it.
The PRAGMA command will most certainly fail, as we know the database is corrupt. Even if it returns OK
, run the VACUUM & REINDEX commands.
VACUUM & REINDEX will probably display error messages as they find problems in the database. If so, run them a second time to see if they cleaned up the problems.
If there are no error messages, then exit SQLite using the .quit
command. Note the period in front of quit. Go to step 8.
Otherwise…
- If step 6 did not repair the database, then proceed with the Low Level Database Recovery steps. This will recover as much information as possible from the damaged database.
Issue the output
and recover
commands as specified in the support document. This creates a file named db-recover.sqlite
.
Exit Plex SQLite using .quit
.
Rename (not copy) com.plexapp.plugins.library.db
to com.plexapp.plugins.library.db.old
Re-launch Plex SQLite: "J:\PlexMS\Plex Media Server\Plex SQLite"
Issue the read command: .read db-recover.sqlite
Exit Plex SQLite: .quit
You should have a new com.plexapp.plugins.library.db
file containing information recovered from the old file.
- Launch Plex Media Server. Rescan the libraries and refresh the metadata.
Thank you for the detailed instructions. I will have to try this when I get back home from a funeral. Much appreciated!
Your instructions fixed my PMS issue though the Vacuum showed no error message. The Pragma did as you surmised. Now with your help we can move from my J drive to C drive. Thank you!
Good to hear Plex is stable.
Moving to the c:\ drive is straightforward.
To move the Plex application, just uninstall and re-install, telling Plex to install to the C: drive.
When you uninstall, use the standard Windows uninstaller (Control Panel → Programs & Features or Settings → Apps). Do not use Revo, CCleaner, or any similar uninstaller program. You want to uninstall just the program, leaving the Plex Data Folder and registry entries intact.
Then, re-install the software. Run the installer. The first window has an Options button. That lets you select the location for Plex. Enter the default location, C:\Program Files (x86)\Plex\Plex Media Server
, then proceed with the installation.
When Plex Media Server starts, it will see the registry entries telling it the Plex Data Folder is on your J drive.
Make sure all your libraries, shares, etc are OK. Then reboot the server just to make sure the changes will survive a reboot. Once you’re satisfied the system is stable, you can move the Plex data folder.
Moving the Plex Data Folder
See this guide: [HowTo] An extended guide on how to move the Plex data folder on Windows
It shows how to move the Plex data folder from the default location to a custom location. You’ll do the same steps, but move it from your J
drive to the default location, C:\Users\<username>\AppData\Local\Plex Media Server
.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.