Plex has become very slow AGAIN!

Made some changes to Plex, shrunk and optimised the DB, turned off thumbnail generation… Thought I would get Plex server to be a bit more responsive but once again its hanging.

Previous thread was here http://forums.plex.tv/discussion/255980/plex-being-really-unreliable-and-slow#latest

I’ve attached the logs. Anyone able to suggest a solution? Thanks!

You attached the logs of Feb 10th.

In them, please notice “SLOW QUERY”. This is telling us the database is again lopsided from media addition, deletion, or other media/metadata activity.

In Settings - Server - Scheduled Tasks, you may setup the server to do some regular maintenance. I find these four to be invaluable at maintaining performance.

  • Optimize database every week

  • Remove old bundles every week

  • Remove old cache files every week

  • Refresh local metadata every three days

     Feb 10, 2017 23:33:40.323 [0xf17ffb40] DEBUG - Completed: [192.168.1.170:62482] 200 GET /hubs/home/continueWatching (20 live) TLS GZIP Page 0-11 973ms 1247 bytes (pipelined: 9)
     Feb 10, 2017 23:33:40.329 [0xd2d59b40] DEBUG - It took 60.000000 ms to retrieve 1 items.
     Feb 10, 2017 23:33:40.336 [0xd1fffb40] DEBUG - It took 90.000000 ms to retrieve 10 items.
     Feb 10, 2017 23:33:40.364 [0xe8847b40] WARN - SLOW QUERY: It took 250.000000 ms to retrieve 50 items.
     Feb 10, 2017 23:33:40.371 [0xd1fffb40] DEBUG - It took 70.000000 ms to retrieve 10 items.
     Feb 10, 2017 23:33:40.376 [0xf1511b40] DEBUG - Auth: We found auth token (xxxxxxxxxxxxxxxxxxxx), enabling token-based authentication.
     Feb 10, 2017 23:33:40.376 [0xf1511b40] DEBUG - Auth: authenticated user 1 as charsiufan
     Feb 10, 2017 23:33:40.377 [0xf1511b40] DEBUG - Auth: Came in with a super-token, authorization succeeded.
     Feb 10, 2017 23:33:40.377 [0xe7f7db40] DEBUG - Request: [192.168.1.170:62482 (Subnet)] GET /hubs/home/recentlyAdded?type=2 (19 live) TLS Page 0-17 GZIP Signed-in Token (charsiufan)
     Feb 10, 2017 23:33:40.385 [0xe9b35b40] DEBUG - It took 80.000000 ms to retrieve 10 items.

Actually, that was on the old thread. Seems they didn’t attach to my post here so I’ll try again. I did change all those settings as you advised before. I checked the NAS and CPU and RAM usage were both low. Rebooted the NAS and Plex is running Ok again.

your logs are already showing it:

Feb 15, 2017 23:10:02.679 [0xf0bffb40] DEBUG - Auth: Came in with a super-token, authorization succeeded.
Feb 15, 2017 23:10:02.679 [0xe8847b40] DEBUG - Request: [192.168.1.177:49175 (Subnet)] GET /library/sections/9/arts?sort=random (16 live) TLS Page 0-49 Signed-in Token (charsiufan)
Feb 15, 2017 23:10:02.687 [0xf0623b40] WARN - SLOW QUERY: It took 890.000000 ms to retrieve 91 items.
Feb 15, 2017 23:10:02.701 [0xe2bffb40] WARN - SLOW QUERY: It took 860.000000 ms to retrieve 81 items.

Please “Optimize Database” ??

Its set to optimize every week as well as remove old bundles, old cache etc as you recommended a week ago.

Is there a way to get Plex to optimize every time the media changes? I don’t add or remove much each week so don’t understand why it gets lopsided for each addition.

There is no current endpoint to allow manual scheduling (cron, etc) of these tasks. They are all integrated in the butler.

If you’re not adding or removing, do you have the option enabled to update every 3 days? If you have a large library and it’s updating (replacing) metadata every 3, I can see how it might happen but have never experienced it. Would you mind trying to run with the ‘3 day’ option turned off since metadata doesn’t usually update that frequently?

Do you mean this option? ‘Backup database every three days’

Apologies, that was ambiguous. Here are my settings. This is my Synology NAS.

Got it, thanks! Have deselected “Perform extensive media analysis during maintenance” and “Refresh local metadata every three days”

Fingers crossed!

Is there anywhere in Plex to see how many shows / movies its indexing? The total size of data is around 14Tb but not sure how many actual shows (guess around 2,000 movies, 600 TV shows)

On Linux and MacOS, it’s a snap.

List the directories and have it count.

find /movies /tv /music -type f -print | wc -l