Plex web slow item loading

Is this your freshly scanned in database?

The number is much larger on a database where posters have been changed/updated. Either with a 3rd party tool or poster updates that happen overtime.

select count(*) FROM taggings WHERE tag_id IN (SELECT tag_id FROM taggings WHERE text LIKE '%image.tmdb.org%' OR text LIKE '%artworks.thetvdb.com%' OR text LIKE '%metadata-static.plex.tv%');

Returns 1,177,862 for me, on the database I sent you. Nearly 22% of the entire table. (5,368,407) total records.

These numbers are on the freshly-created database.

I created the server,
attempted to change a few posters,
grabbed these totals.

Toy Story 4 would load most of the time.
Other times, ā€œThere was an error editingā€¦ā€

In looking at the DB, not sure if it’s how I created it or not, the tag_id is 165.

The tag_id does not seem to be consistent between databases. I initiailly thought it was but it’s not.

Related to this issue

For me and my setup (Asustor NAS) using HTPC its related to collection tags

If a movie or tv show belongs to any collection the item loads very slow. (6 or 7 seconds)
For instance, if I go to the pre-play screen for Back to the Future it takes a long time.

If I remove it from my collection and go back in, it loads in under a second. As soon as I add back to the collection it’s back to 7 seconds

I was wondering why my TV section didn’t seem to have any problems. It’s because I only have 20 collections in TV vs. 250 in my movie’s library

I realize you guys are looking into an issue with posters but with a small exception most of the movies being mentioned here all have collection tags

My issue may or not be related, I’m just mentioning it in case it’s a small piece of the puzzle

I should mention, the same issue exists on my Windows server and the Asustor server was rebuilt from scratch with a fresh database and the issue persisted

1 Like

Just ran this on my db file => returned 30087 - Doesn“t seem too bad?

@ChuckPa checking on the status of this with the poster changes causing issues with loading, etc.

I can also confirm two Plex scanner processes…

@ChuckPa is there any ground coming on this issue? Seems to still be an issue. Changing posters makes titles become unplayable. Checking on any status updates.

I also have performance issues on media pages, when I have 6-7 simultaneous streams, Plex slows down and takes time to respond to HTTP requests.

I’ve logged all traffic through Nginx, and I see a lot of /:/timeline requests that take more than 10 seconds, maybe it’s related?

Any ideas?

@Maxou44

There is slow progress but the most common problem is Size -vs- CPU - vs Optimization (full export/import).

6-7 concurrent streams (knowing audio transcoding can chew up a CPU) is something to consider. What are you running?

Reproducing this objectively is problematic.
I’ve loaded it up with over 400,000 items and not had an issue.

Concurrently, I load up one Toy Story movie and I reproduce it.

There is no logic behind any one arbitrary media item causing a problem over all others.

@Maxou44

Have you tried using my optimization after loading up PMS?
Also, what CPU do you have, HDD or SSD for PMS DB, and how many items?

Not to derail the thread but this may be important too.

@ChuckPa, I run your tool usually about once a month - this is on Windows - and it works great. But reading your comments about the IVA bug, I browsed the db and found that there where 28.161 rows in media_parts where the column File is blank and the extra_data column has something like

at%3Akey=%2Fservices%2Fiva%2Fassets%2F427380%2Fvideo%2Emp4%3Ffmt%3D4%26bitrate%3D5000&ma%3Acontainer=mp4

So i deleted the rows with DELETE FROM media_parts WHERE TRIM(FILE)='';, the db is now a couple of MBs smaller and everything is working fine but…

I can see in the table media_items 28.171 references to the deleted media_item_id where library_section_id (the corresponding library) is NULL.

Should these rows be deleted too? Would your tool do this?

I could also do this manually but I’d like to be sure it won’t break anything :smiley:

Thanks a lot!

  1. When in doubt – Make a backup copy :smiling_imp:

  2. Go ahead and trim those too. Do remember, if you don’t chain the deletes or keep the WHERE clause tight enough, you’ll end up deleting valid IVA extras (which are part of live metadata / trailers.)

I’m trying to figure out the next features to add to my tool and this might be one of them – in spite of the dangers ( but who doesn’t like to live dangerously ? )

To consolidate everything, when you’re done, please finalize the full sequence so others can benefit as well ?

1 Like

Thanks!

Will do. No problem :+1:

Looks like deleting so many entries is not a great idea after all.

As you mentioned, some (most?) are related to trailers. Refreshing the metadata in the library will put everything back again.

Anything new on this one? :slight_smile:

1 Like

bumping again…

@ChuckPa May I ask if you could find something new?

1 Like

@Mitzsch

I can’t even properly replicate this.

My PMS is a lowly 1000 passmarks/thread xeon.
PMS is installed on HDD.
My test database has 942 full series loaded.

Workstation → PMS connection is wired 10G (but 1G works well too)

When I open that Library section, the load time is nearly instantaneous.

Here are two videos.

We need to figure out why I’m not able to reproduce your problem.

Maybe it’s how I create the library section ??

  1. 9000+ movies
  1. My QA TV library with all episodes for each series

What am I missing?
– I am NOT touching the DB other than my DB optimize tool.
(( Export , import, re-index ))

1 Like

Thanks for your message!

Well, the slow item loading behavior is not that much present when scrolling through the library. Mine is as fast as yours shown in the linked videos.

In the web UI it’s only really visible when doing the ā€œweb benchmarkā€ - Media Info → Show XML view.

However, it’s very visible in other apps like Plex HTPC… Here is a video.

All the items that take long have been ā€œmodifiedā€ with different artworks (e.g. Barbie), and the items that load instantly are ā€œstockā€ (= predefined artworks… e.g. Talk to me)

Maybe you could test this scenario? (Maybe also with my db I“ve sent you a while back?)

@Mitzsch @carrousel5301 @ChuckPa reading through this thread it seems VERY similar to the issue some of us have been having over in this thread → PLEX movie issue - CPU death spiral - #59 by Quick010

Basically when trying to play or view xml (which both use the includeRelated=1 query param) plex will take an excessive amount of time to respond (or sometimes not respond at all) on certain movies. It also happens to consume excessive CPU when this is happening. This occurs only on some movies, and only when using the default Plex Movie agent, It does not happen with the legacy or tv agent.

It appears this thread has narrowed it down somewhat to something with the taggings table. I’ve found that refreshing the Metadata for the item will clear up the problem, though I don’t know if that is modifying the taggings (maybe?)

Unless I missed something in this thread it seems like its still not resolved? If there is anything I can provide to help out with this issue let me know. There are some people that have replicated it with fairly small databases and provided examples in the other thread.