PLEX movie issue - CPU death spiral

I also found this other thread->

And people there seemed to be able to cause this issue by simply updating a poster for a movie and traced it back to a database entry that is created when this happens. They at least seem to have some engagement from support ¯\_(ツ)_/¯

1 Like

hmm, i wonder if this is the issue i’m seeing also 100% CPU, becomes unresponsive, no activity?

very frustrating and hard to t-shoot :frowning:

Yes, seems to be the same issue, still on-going for me. I have a script to detect when the server becomes unresponsive and restarts it, but its not possible to see which movie is causing it in the logs, very frustrating. This thread is over a year old, so I don’t expect it to be resolved.

Still going on… somehow… WTF is going on PLEX people? I’ve used plex for years now and never seen an issue sit “broken” so long. One user, playing 1 movie, can bring down my entire 24 core CPU server.

The issue is movies only, tends to be x265 movies, and actually it seems to be the movies I changed the default poster from when it got added.

For example, The Wind Rises from PSA. I got the 720 version, put it into PLEX, and changed the default poster. The movie could not be played by anything and crashed the server. I unmatched the movie and rematched it manually, and it could be played just fine again.

EDIT: One change, now when the server “dies” from someone trying to play a x265 movie with a changed poster, the CPU doesn’t spike. The server sits and dies, but does not use 100% CPU while doing it anymore.

it’s even worse, that user doesn’t even get to play the movie, it hangs loading the metdata for the movie :rofl:

I also have a 24 core machine, I feel your pain… :sob:

What’s silly to me is I got one of the new intel P and E 24 core chips thinking it’ll be great for a PLEX server and Gaming PC. Then plex fixed recently the collections/related media slowness thing and this weird movie/changed poster/x265 crash bug stopped using up 100% CPU when triggered. Now PLEX uses probably 5% or less CPU at all times no matter how many people are watching and so far the most any game has pushed it to is 20% CPU used. I got this crazy multi core CPU, huge copper heat sink, and in the end I barely actually use it. The internal GPU on the chip gets the most action as the PLEX HW transcoder.

I’ve posted this in another topic a couple months ago but figured I’d post it here as well. I’ve dialed it down to the “taggings” table where Plex is dumping thousands of completely useless metadata that (as far as I can tell) is never used.

This solves the issue 100% of the time and is repeatable. I run this daily.

This isn’t my entire script, but these are the relevant bits. I run docker, so I copy the Plex SQL binary and then delete the useless metadata info from the table.

Every effected movie will now play flawlessly, untill they get broken again… So just run this daily.

    docker cp ${CONTAINER_NAME}:/usr/lib/plexmediaserver/ /opt/plexsql
    # Count and print the number of rows that will be deleted
    /opt/plexsql/Plex\ Media\ Server --sqlite com.plexapp.plugins.library.db "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%');"
    # Delete the rows
    /opt/plexsql/Plex\ Media\ Server --sqlite com.plexapp.plugins.library.db "DELETE 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%');"

I shared this info with ChuckPA nearly 6 months ago btw…

1 Like

Maybe this thread (or the others like it) will get more more traction as more people start to have the issue because of the recent poster changes, which will make more people manually select a poster as this bug does seem to be related to updating the poster (I linked a thread above a month or so back). So you add a new movie, you are unhappy with the poster, you update it manually and now no one can watch it, AND if they try it brings down your whole server. The best you can really do (for now) is remember to refresh the metadata after you add a new movie, and especially after you’ve edited the poster.

awesome, i need to add this to my “keep plex alive” script that I already run for crashes :+1:

I’d recommend taking a backup of the DB beforehand but I’ve been running this daily for months and have had 0 issues related it or the main issue in this topic.

I just started experiencing this problem as well. I was at first running into it during Watch Together sessions but now it seems to be happening randomly when some client devices start up some movies. I have refreshed metadata after adding items, I have run the PlexDBRepair tool and done optimizations. I have had nothing but problems since the mid February DB changing update. I have even burned the old DB and started fresh. Everything was running smooth until that February update. I’m going to try that script carrousel5301 posted during my daily maint window tonight.

Thank you for this! I assume this is something you need to run whilst Plex is stopped so the DB isn’t in use?

Bumping this - again - and noting that I think above posters are correct that it’s related to changing the poster. That seems to be the one common element on the movies that have triggered the issue on my server. And I think refreshing metadata and analyzing the file after changing things works to prevent it? That much remains to be seen tbh.

That’s how I fix it for now. Change poster (because for some reason now it picks the worst poster available), fix match, and analyze. That seems to fix it generally, as long as I do the whole process every time.

WTF? Can someone please fix this issue… the new poster model picks the weirdest posters for every movie pretty much forcing me to change the poster. This triggers the bug, specifically, everytime.

We have exactly how to reproduce this issue, lots of people have it, the bug crashes the entire F@#KING SERVER, can this please be FIXED?!?!

To reproduce the issue:

  • Add an x265 movie
  • Update the poster from the ugly one PLEX picks by default now
  • Attempt to play item, it will not play, server will hang, try it more than once and the server crashes for ten minutes+

To fix the issue:
Once the movie is in and poster is changed manually to the “normal” one…

  • Refresh metadata, I prefer to manually “fix match”
  • Analyze the movie

This is only an issue for x265 Movies whom posters have been changed by the user.

PLEASE FIX THIS! With the recent poster changes in PLEX I often fix the default poster for most movies going into my server. Then a user tries to play it before I’ve run the refresh/analyze process and my server crashes.

Can you reproduce using your steps then grab your logs and share them?

Here’s the logs, the users a while back in the above posts determined this is something to do with extra metadata in the movie data.

Prior to crashing events:
PRIOR - Plex Media Server Logs_2024-05-10_10-04-50.zip (808.1 KB)

After attempting to play Iron Man 3 and having the server hang:
AFTER - Plex Media Server Logs_2024-05-10_10-28-18.zip (826.6 KB)

1 Like

Do you observe the crash/hang when playing back on any client or is it only happening when playback from a specific client?

I only use Apple stuff, long story but just ended up stuck with a full apply spread. Apple TV 4k, iOS clients, and occasionally the desktop client.

I see the issue most with Apple TV playing, but that’s what I use to view PLEX 99% of the time.

My remote user who has this issue and is often the cause of my crashes is using I think a Samsung TV.

Log from remote user who just crashed trying to play Spider-Man No Way home moments ago from their Samsung TV PLEX app:
Remote Test - Plex Media Server Logs_2024-05-10_10-43-31.zip (872.3 KB)

If I may augment here?

Diagnosing (DEBUGGING) problems with DEBUG logging turned off isn’t going to work well/be easy.

Would it be possible to get a set of logs with DEBUG logging enabled so we can see the actual steps it’s performing at time of failure rather than the cold hard error?