I have a Plex server running under Docker on a Synology NAS, configured for external access. I have a mid-sized library (some might consider it smallish, compared to what I read here and there), and it’s used either internally at my place, or externally at my GF’s.
Whether internally or externally, I noticed that accessing the server through the web client, it takes a couple of seconds for the home to refresh, and when accessed through the AndroidTV client (Shield of MiBox) it sometimes do not populate the home at all (except for external services like Plex own streaming or Tidal). What works, mostly, not always, is to wait a bit, switch to a specific library (movies, or series, or music), wait a bit, then switch back to the home.
My feeling is that the server is too slow to reply and my question is: where can it come from? I optimized the DB and it was better for a day or two, and then it started again. Would there be a miracle cure I did not think about?
(Bonus question: is that intended that the AndroidTV client never refreshes unless you switch to another screen?)
Oh, I am plenty comfortable with the command line, that’s my main way of interacting with computers. As a mater of fact, when I said “I optimized the DB”, I really meant that I used PlexDBRepair already, and marveled at it, thank you for that.
Sadly, while it clearly sped up things, the problems crept back in quickly.
I’m adding media, but not that much. I added one film, one show episode and five music albums this last week, which is in line with my average.
The container, along with its data volumes, is stored on the same Nas volume, a SHR (Synology raid-like redundant volume) disk, with a btrfs file system, on four WD Red HDs.
According to the resource monitor, neither the processor (1.5Ghz Celeron) nor the RAM (8Gb) are heavily used, everything is otherwise running smoothly. Even Plex is working fine, but for that couple of seconds library loading delay, and the effect it has on the AndroidTV client.
I will state upfront that I’m not a fan of containers when a native app is available due to the additional overhead especially on weak CPUs like a Synology.
That having been said, coupled with Synology not updating the Plex app in Package Center, I TOTALLY understand wanting to have the container update itself (which is what Package Center SHOULD do – insert eye roll here – lol)
I would like you to grab the log files or me.
Plex/web – Settings - Server - General – Make certain DEBUG logging is enabled and VERBOSE is disabled. SAVE and restart if changed
Now restart plex
Let it sit 3 minutes (as idle as possible)
Load up the plex/web page and recreate the problem.
Next, download the logs (Settings - Server - Troubleshooting - Download Logs)
Here they are. I restarted the container, waited for three minutes, opened the Plex web client locally, confirmed that the homepage show the cloud offering instantly but took a couple of seconds to refresh to show the local library items. Then I closed the page, waited another three minutes, and launched the (again local) AndroidTV client. It showed the cloud offerings but not the local library, and it did not refresh.
This is the browser and the sluggishness of the J3455 CPU when it has a big list to assemble.
If I remember correctly, the browser asks for media in blocks of 100 items.
( items = posters, titles, text, etc )
It can take a couple seconds for PMS to load up that info and send to the browser. with this CPU. “Slow to reply” is subjective but here you can see it having trouble getting info from the DB.
/614b9572e93c2907c60df6228f60567a816bc7b.bundle/Contents/_combined/posters/d45aaca567216d4582904fedea392c6c08e0bcba"]
May 29, 2024 08:19:47.605 [139728531372856] DEBUG - [Notify] Now watching "/media/video/series/misc/Handmaids Tale/season03"
May 29, 2024 08:19:47.670 [139728459361080] DEBUG - [Req#143] Calling back into ourselves for photo to transcode, optimizing the process (status: -1)
May 29, 2024 08:19:47.817 [139728450931512] DEBUG - [Req#147] Photo cache obtained 361637 bytes from /library/metadata/100157/thumb/1716681358?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
May 29, 2024 08:19:47.817 [139728450931512] DEBUG - [Req#147] Saving original media file to /config/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/b1/b16ac8f46dc5a7a7e972574075c447e5a60905f0.jpg
May 29, 2024 08:19:47.818 [139728476236600] DEBUG - [Req#140] Photo cache obtained 501475 bytes from /library/metadata/21060/thumb/1715568616?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
May 29, 2024 08:19:47.818 [139728476236600] DEBUG - [Req#140] Saving original media file to /config/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/2f/2f0ca8001fd891a2195f50f70653aa4ce88c263b.jpg
May 29, 2024 08:19:47.918 [139728453040952] DEBUG - [Req#146/Req#152] It took 70.000000 ms to retrieve 222 items.
May 29, 2024 08:19:47.919 [139728453040952] DEBUG - [Req#146/Req#152] Calculated media file path for path [metadata://posters/tv.plex.agents.series_02067844c8a97b3b0c82ad87214454da738728d2]: ["/config/Library/Application Support/Plex Media Server/Metadata/TV Shows/c/fb5e015e56adc402b9f45571c7ae4f562fdb046.bundle/Contents/_combined/posters/tv.plex.agents.series_02067844c8a97b3b0c82ad87214454da738728d2"]
May 29, 2024 08:19:48.069 [139728459361080] DEBUG - [Req#143] Photo cache obtained 117959 bytes from /library/metadata/15364/thumb/1715903288?X-Plex-Token=xxxxxxxxxxxxxxxxxxxx
May 29, 2024 08:19:48.069 [139728459361080] DEBUG - [Req#143] Saving original media file to /config/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder/3d/3d37d18002592ef50c7897640ca2d1ebf769296d.jpg
May 29, 2024 08:19:48.146 [139728444603192] WARN - [Req#14a] SLOW QUERY: It took 270.000000 ms to retrieve 24 items.
May 29, 2024 08:19:48.152 [139728472017720] WARN - [Req#137] SLOW QUERY: It took 400.000000 ms to retrieve 24 items.
May 29, 2024 08:19:48.171 [139728572218168] DEBUG - Completed: [192.168.178.100:53311] 200 GET /hubs/home/recentlyAdded?type=1&pinnedContentDirectoryID=1,4,6,12,11,2,3,5,20&contentDirectoryID=4&pinnedContentDirectoryID=1%2C4%2C6%2C12%2C11%2C2%2C3%2C5%2C20&includeMeta=1 (19 live) #137 TLS GZIP Page 12-35 3545ms 11851 bytes (pipelined: 1)
May 29, 2024 08:19:48.175 [139728572218168] DEBUG - Completed: [192.168.178.100:53320] 200 GET /hubs/home/recentlyAdded?type=1&pinnedContentDirectoryID=1,4,6,12,11,2,3,5,20&contentDirectoryID=4&pinnedContentDirectoryID=1%2C4%2C6%2C12%2C11%2C2%2C3%2C5%2C20&includeMeta=1 (18 live) #14a TLS GZIP Page 12-35 2999ms 11851 bytes (pipelined: 1)
May 29, 2024 08:19:48.286 [139728448822072] DEBUG - [Req#148/Req#159] It took 120.000000 ms to retrieve 238 items.
May 29, 2024 08:19:48.287 [139728448822072] DEBUG - [Req#148/Req#159] Calculated media file path for path [metadata://posters/3919bf87db171f954f46ccffb5573bf3db8c61a6]: ["/config/Library/Application Support/Plex Media Server/Metadata/TV Shows/c/34f24e6e6b859d8704fa2d88c0c0e5bfb74a463.bundle/Contents/_combined/posters/3919bf87db171f954f46ccffb5573bf3db8c61a6"]
For that situation where you came back into the browser and it stayed blank???
That’s all browser misbehave.
If you can recreate it (should be easy) – Hit Control + F5.
After it erases the window, let me know how long that takes to reload.
I actually never had any real problem with a browser, it refreshes after a couple of seconds. It’s the AndroidTV client that does not and needs cajoling.
That being said: I woke up to a sluggish NAS and started to do a bit of maintenance and… Well, I guess you were right: running as a container does have a overhead. I decided to do a docker system prune, and about 50Gb (yeah, I know) freed later, everything, including Plex, is much more responsive.
So I guess… My bad. Thanks for your help anyway, it’s very appreciated.