Plex HTPC/Web slow item loading

I have attached the server log and the Plex HTPC log. Maybe they are useful. (Note I´m currently not at home and access my server through a wireguard VPN tunnel.(~50mbit) (client ip 10.8.0.3 => server 192.168.1.26) Performance regarding loading seems to be the same as being in my local network.)

Plex HTPC-slow-loading.log (157,0 KB)
Plex Media Server Logs_2022-10-16_10-28-39.zip (1,4 MB)

The problem with these logs is I don’t know what metadata is being slow for you. Was there a particular metadata id that was notably slow?

Oh well my bad, I should have given more information.

Do you mean the ID of an item that can be found via the plex web interface, Get Info, and XML view? If yes, I will add them as soon as I have access to my server again!

Yeah. If you use that, get info on the item, and view the XML, look at the URL. You should see something like ….plex.direct:32400/library/metadata/XXXXX and the XXXXX portion is the id.

Plex Media Server Logs_2022-10-22_10-53-53.zip (2,1 MB)
Plex HTPC-slow-item-loading.log (150,7 KB)

Here are the new log files this time made on a different machine (in the same network as the server) and the newest server version.

Media IDs:
Slow: 9784 => Doctor Strange in the Multiverse of Madness
Fast: 10093 => Star Wars - Die letzten Jedi (The Last Jedi)

I noticed that loading the xml view is also slow on the “slow ID item”, whereas it is almost instant on the 10093 ID item.

Thanks!

Should the new build Version 1.28.1 also fix this issue?

I have seen this =>

  • Improved performance while loading pre-play screens

in the changelog but I´m not sure if this is targeting the problem in this thread. (I also can not try the new build at the moment)

I saw this mentioned and installed the new version.

It did not seem to target our problem.

Have either of you tried Chuck’s DBRepair?
He introduced it a few weeks ago in an SQLite thread that’s targeting optimization.

1 Like

Chucks tool is for Linux. I’m on Windows and I think Mitzsch is also

I do plan on using that tool for another server I have on an Asustor NAS, but that’s for unrelated issues

I don’t know what was found in the logs but this issue only exists in movies, movie collections or TV collections which I didn’t notice before

This problem is specific to HTPC (no other apps) and only to those items, collections being the worst offender. Spinning wheel for 7-10 seconds while it loads

All TV shows and individual TV episodes picked from the library, continue watching or recently added load immediately.

Just updated to 1.28.2.3347-0fac4b28, no change.

New problem though, now no photos will display. You can see the pictures in recently added or the library but when you click on a photo you get…

Not sure if this started with 1.28.1 or 1.28.2 because I updated back to back

Urgh! The changelog sounded so promising…

Well, my server is actually running Linux so I might give the DBRepair tool a try. :wink:
Although it would not explain the slow behavior of Plex HTPC in comparison with other clients like the shield. They load fine also with the current state of my DB just Plex HTPC is slow.

I´ll give it a try and report back if it solved the issue…

@gbooker02
Were you able to take a look at the new logs? Have you found something (useful)?

I had looked at them several days ago but I didn’t see anything in there that could be the culprit. It does seem that the issue is not on the PMS side as I didn’t see any required requests that took longer than 10s of milliseconds. The only request that took longer was the request for GET /hubs/metadata/9784/related which took 3 seconds but I asked internally and the pre-play screen shouldn’t be blocking on that request (and then I forgot to reply here with that info).

1 Like

Thanks for looking at my log files!

Interesting, maybe I can speed this up with the db tool and see what happens. Maybe it does matter for Plex HTPC for some reason…

So as promised I tested the DBTool (steps 1,2,3 and 4 used) and it indeed helped. I benchmarked it by opening the XML view and check what the PMS logs state.

State before DB optimization:

3362ms

State after DB optimization:

1545ms

And indeed this is visible in Plex HTPC, loading Item 9784 is now faster.


A different item - as slow as Item 9784. I did an intermediate “refresh metadata” and wow…

State before DB optimization and before refresh metadata action:

2875 ms

State before DB optimization and after refresh metadata action:

385ms(!!!) => Now item 10092 loads immediately in Plex HTPC.

State after DB optimization and after refresh metadata action:

223ms => Item 10092 loads immediately.

Plex Media Server Logs_2022-11-06_12-03-28.zip (412,1 KB)

1 Like

Seven times faster? You are the winner of this year’s
:turtle: :trophy:

btw chuck pulled my fix for the bug you found using override.conf
its only in master, not packaged yet but very kind of him.

1 Like

After some time and some further tinkering, I found out that it’s not exclusive to plex htpc. Every (!) other Plex app including Plex Web has this issue but shows it differently. Most other apps would load the main info instantly (like what the movie is about and the cast) but loading other movies that have the same genre or are from the same collection takes forever. (<10s) So you can call it a staggered loading theme, Plex HTPC on the other hand takes <10s but displays all the information at once. Refreshing the metadata, as shown in a post above, resolves this…

Optimizing the database did not make it faster. I tried a page_size of 4096 and 16384 but that had no effect. (Well, 4096 is way faster than the default 1024… I also measured that with 16384 it was slower, I guess the sweet spot is 4096)

I have my 1080p and 4K files in a separate library but plex syncs playback progress across those libraries. Some of the 1080p files have been added years ago and the 4K ones just recently. (Different metadata versions? Files added with different media server versions?)
Can this connection/sync between those libraries and differently added movie files cause this issue?

We conducted some tests and found that PMS is slower with a page size of 4096 when compared to 1024. You should note that up until 1.30.1, changing the page size also changed the size of the cache and you may be seeing this effect. When we conducted our tests, we forced the cache size to remain the same for the two page sizes. PMS 1.30.1 has a preference that lets you change the cache size without having to go through the trouble of changing the page size.

Interesting. In my testing 4096 was always faster than the default value albeit not dramatically.

I have tried that but didn´t notice any improvement.

Regarding my issue, I have now refreshed the metadata of all my movie files, and now the majority loads immediately. However, there are still movies that take ages, even though I have refreshed the metadata. Refreshing the metadata on those items again makes them also fast. I have no idea why it behaves like that…

Small update on that one…

I have no idea what happened but now everything is loading very fast, even newly added files. (Those have been slow in the past…)The server is running version 1.31.2.6757.

Hast there been something changed to address this?

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