Slow Response - Optimize DB helps for a short time

Server Version#: 1.20.5.3600

I have been noticing some lag with loading the interface lately. It spans across various devices (Apple TV, Nvida Shield, iOS devices and the web console). It will take an extended time to load a movie’s details page (meaning the page where the description is and you can start play back, view the trailer, etc.). I would say anywhere from 25-75 seconds. Same happens with TV shows. I haven’t streamed non-synced music recently, so cant say if its occurring with music as well or not.

I have noticed some improvements if i manually optimize the database (it is doing a weekly optimize in the default settings). In the last 48hrs i have optimized it twice though. I am wondering if there a way to see if there is an issue with the db (i dont have much db experience) and also if there is a way to more frequently optimize it until i can resolve it another way.

I should also note, I did just upgrade to the latest version an hour or so ago; and did an immediate optimization following that. If this was a known issue for the previous version then this may be a moot point. I did not see anything in the latest release notes about this type of issue thought (unless i missed it).

Thanks

anyone?

This article has instructions for checking your database for errors, and steps to attempt a repair if so:
https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

You may also want to check the size of your database; while there is no set size it should be, even those with large libraries seldom see databases in excess of several GB.

Thanks, I’ll take a look tomorrow and see. My library is large. I think last time I looked the db was only around 2gb or so though.

ran through this; will see how it goes. didnt report any specific errors that i saw. Also i was wrong the db is only about 580MB. So smaller then i thought.

If dB is on regular hd, defrag.

Otherwise consider moving to ssd.

If already on ssd, consider doing a manual trim (available from windows defrag).

I use a script to optimize my db and clean bundles more often than scheduled tasks does. It’s basically just calling a url, I do so via curl but you can use whatever means you prefer.

curl --request PUT http://127.0.0.1:32400/library/optimize?async=1&X-Plex-Token=
sleep 15m
curl --request PUT http://127.0.0.1:32400/library/clean/bundles?X-Plex-Token=

Insert your token at the end

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