Server Version#: 1.25.5.5492
Player Version#: 8.30.0.30944
Every night my plex server maxes out the CPU of the server and access to the playing files etc do not work. This started about a month ago and I found that the database had corruption so I followed directions and tried to repair it from backups many times. It keeps getting corrupt somehow
. I did find before it locks up the server it was getting stuck on a movie file “wreck it ralph” which I manually deleted from my HDD since I noticed that file in specific would mess things up. Yesterday it hung again and I repaired my database back to the backup I had from the 12th. This morning my server was maxed out again and stuck. I tried to see what was jamming it up but did not see anything that jumped out at me. I force closed the server then restarted now it is working fine again. This is driving me nuts, any help is appreciated.
There was an issue where some movie extras could have multiple (thousands) of database entries. This was fixed in 1.25.4.5487. Plex removes a portion of the entries during startup and nightly maintenance. In the worst cases it can take weeks to completely clean things out. The process can be forced by optimizing the database, but the system will be non-responsive until finished.
I think you ran into the cleanup process. Your server was running normally when you shut it down, removing metadata for a featurette (looks like one for Wreck It Ralph).
There are 2649 entries in Plex Media Server.1.log for destroying metadata for Featurette - Rich Moore, and they all have different item numbers. This is why I think you’re running into the problem mentioned above. The process started at 06:17 and was still in process when you shutdown Plex at 09:26.
This thread has additional details from identifying the problem to issuing a fix.
@FordGuy61 Thank you so much. So I guess I was not patient enough. I just kicked off the optimization and I’ll leave it running for as long as it takes.
Pull the log files. Let’s see if they show anything like before (destroying metadata, etc).
If it is the cleanup process hitting the CPU, stopping it won’t hurt anything. It just delays things. It will kick off again during the next maintenance cycle.
@d1617 - I have been looking at the logs and there is evidence of lots of extras and also slow purging of orphaned entries in the database
Could you please shut down Plex Media Server and when the processes are terminated, then copy out these files
/Users/admin/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
/Users/admin/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-wal
/Users/admin/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db-shm
The last 2 may not exist after a tidy shut down of Plex Media Server
Please zip the files, upload to dropbox or google drive etc and send me by Private Message with cc to @FordGuy61 a link to where you uploaded the database files zip
The logs show a database optimize taking about 25-30 minutes to run - during this period, the server is effectively locked out and not available
Ok, I just shut it down and I’m zipping up the files. Just an FYI it seems huge for whatever reason. I remember about 4 months ago or so the database was not this large (8GB). Together with all 3 files, it is up to 18GB. I’m going to upload it soon and message you both. Thank you!
I am sorry, I do not remember the order of the updates. I believe I just updated shortly after the updates were released. I see Version 1.25.6.5577 available now you think I should update now or wait? I forgot I noticed it always seemed to get locked up on Wreck it Ralph for whatever reason so I have since removed that movie but it still thinks it is there and gets stuck.
Well “Wreck It Ralph” movie is the movie that ended up with 4 million copies of the same Extra “Featurette - Rich Moore”
Please do update to 1.25.6.5577
I have sent you a PM asking for a new copy of the database after shutdown and carefully checking for processes in Activity Monitor and looking for the db-shm and db-wal files as well as the db
I have also given instructions to @FordGuy61 to help with manual adjustments to the database to remove the 4 million extras and related items in the various tables in the database - the fix did not remove these extras because the internal GUID was not as expected
The reason the fix for the extras that came out in 1.25.4 has not resolved the issue was because the trailers/clips were not provided by Plex but through an add-on plugin:
Traileraddict
This is currently with the Plex Media Server development team to look into making the fix more general - meanwhile, the database is being manually amended to remove the extras