Slow library performance due to increasingly growing database

@sa2000, I’ve PMed you the debug logs. A few more things I thought of that could be of note:

  • I’ve been running my Plex server for the better part of a decade, so I’m sure the database has gone through more than a few migrations. I had previously thought the database file may have become corrupt and manually repaired it as described here, though that obviously did nothing to help.
  • I don’t recall exactly when, but at some point this summer I finally upgraded my movie library to use the new Plex agent as described here, and it’s very possible that I did this shortly before the number of extras started to grow seemingly exponentially.
  • The affected movie was actually two video files (Logan, and Logan: Noir Edition) that were previously separate but must have been combined when upgrading to the new agent without me realizing.
  • Simply clicking on the three-dots icon for the movie and clicking “Refresh Metadata” did NOT trigger the creation of new extras, but after reverting the database and trying again I found that first clicking “Get Info” immediately triggered a metadata refresh which DID trigger the creation of new extras. No idea what that’s about, but I’m sure you will.
  • Just for the sake of being thorough, CPU usage during the refresh process was between 100-200%, and memory usage more than quadrupled to >6GB at its peak. As you’ll see from the logs, it took about 10-15 mins of doing some kind of background work before it started to actually add the new extras. Once that started, the tab for the web UI I had open actually froze with ~150% CPU usage (I’m guessing a crazy amount of data was coming in over the websocket?)

Hope this helps.

PS: as a mostly-unrelated and minor bug report: if the PMS Plugin Logs folder is missing from the Logs folder, Plex won’t start. That could probably be handled more gracefully by just creating any missing folders.

1 Like