Plex Media Server fetching metadata timing out while I browse my movies, making viewing metadata SLOW

Server Version#: 1.19.1.2701
Player Version#: Apple TV is my main client, but I don’t believe it’s player-specific

When I browse to a movie on my Apple TV (the main client that I use), if I have not viewed the metadata screen for the movie recently, it takes from 20-30 seconds to load, which is really annoying - but if I have viewed it recently, it shows up almost instantly.

I was watching the logs, while clicking around in the UI, and I believe this curl timeout is the source of my issue…

Apr 26, 2020 22:43:24.110 [2492] Debug — Request: [172.16.17.80:59434 (Subnet)] GET /library/metadata/986349?asyncAugmentMetadata=1&checkFiles=1&includeChapters=1&includeConcerts=1&includeExternalMedia=1&includeExternalMetadata=1&includeExtras=1&includeGeolocation=0&includeOnDeck=1&includePopularLeaves=1&includePreferences=0&includeRelated=0&includeRelatedCount=15&includeReviews=1 (9 live) TLS GZIP Signed-in Token (phrend)
Apr 26, 2020 22:43:24.952 [2492] Debug — Last refresh (2020-04-23 03:24:51) appears to be older than directory change time (2020-04-26 15:40:37), need to refresh local media agent.
Apr 26, 2020 22:43:24.952 [2492] Debug — Refreshing GUID: 'com.plexapp.agents.imdb://tt6868216?lang=en'
Apr 26, 2020 22:43:24.952 [2492] Debug — HTTP requesting GET http://127.0.0.1:32400/system/agents/update?mediaType=1&force=1&respectTags=0&guid=com%2Eplexapp%2Eagents%2Eimdb%3A%2F%2Ftt6868216%3Flang%3Den&id=986349&agent=com.plexapp.agents.localmedia&async=0
Apr 26, 2020 22:43:44.967 [2492] Error — Error issuing curl_easy_perform(handle): 28
Apr 26, 2020 22:43:44.967 [2492] Debug — HTTP simulating 408 after curl timeout
Apr 26, 2020 22:43:44.967 [2492] Error — Error parsing content.
Apr 26, 2020 22:43:44.967 [2492] Error — Error parsing XML response for update.
Apr 26, 2020 22:43:44.967 [2492] Debug — We're going to try to auto-select an audio stream for account 1.
Apr 26, 2020 22:43:44.967 [2492] Debug — Selecting best audio stream for part ID 2500876 (autoselect: 1 language: en)
Apr 26, 2020 22:43:44.967 [2492] Debug — We're going to try to auto-select a subtitle.
Apr 26, 2020 22:43:44.967 [2492] Debug — Audio Stream: 4907746, Subtitle Stream: -1
Apr 26, 2020 22:43:44.967 [2492] Debug — Activity: registered new activity 64c8e422-5628-49b3-8df0-d874babd5870 - Refreshing

Is this indicating that Plex is trying to fetch data from IMDB, and timing out?
(I do have a PiHole, but I see the same behavior when it’s enabled or disabled.)

I’m also wondering if there is a way that I can force these metadata updates ahead of time, so they don’t happen while I’m interactively browsing my media collection and run into these delays?

Take a look at the second line in your log snippet.
Did you change something in the subfolder where the media files of this item are stored?
Whenever Plex is detecting a change, it goes on to inspect the media files and the whole folder, to catch modified media files or potentially added external subtitles etc.
If your server or your media storage is particularly slow (hard drives spun down?), this can take a long time.

It gets worse if the folder where the media file is stored has a lot of files in it. Which is one of the main reasons to prefer the “1 movie =1 folder” storage method.

You can activate a Scheduled Task where this “deep analysis” is performed regularly in advance at night. But it doesn’t do the whole server in one go, but needs several nights to catch all files. So it might miss some of the most recently changed folders.

Thanks, @OttoKerner - yeah, I noticed that message, and was not sure if it was the signal that was triggering this whole thing, or not? All of my movies are in the same directory (technically, all of my SD movies are in one, and HD are in another), so yeah, the directory change time changes every time I add a movie. If I create a sub-dir for every movie, do you think that will resolve my issue?

It can ease it significantly.
There can be additional slow-down factors, like the “sleeping hard drives” I mentioned above.

You can use Filebot or similar tools to help with the creation of the subfolders and moving of the files.

My media is on a NAS with disks configured not to spin down, so I don’t have to worry about that particular issue, and I found another post of yours about Filebot already, and it looks like a feature-packed tool!

I’m going to give the sub-dir per movie a try, and will post back with my results - but you’ve never steered me wrong before, so I expect to see an improvement!

Thank you, @OttoKerner!

I ended up writing my own script to move each movie’s files into its own sub-dir, and that seems to have made a dramatic improvement. Thanks for the suggestion, @OttoKerner!

(I’m not sure which Scheduled Task does the deep analysis you mentioned, but I have them all checked already, so I’m going to assume it’s doing it.)

1 Like

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