Plex Deadlocking with to many hung connections issues for last 5 months Now!. (This ended up giving me anxiety attacks!) (Edited title for clarification)

This may be relevant to some:

1 Like

I think this would fix the issues I have been seeing while using Overseerr and getting deadlocks when it scans Plex. Hopefully, this feature request gets greenlit and we can see issues like this go away.

1 Like

@sa2000 I’ve added new logs+connections+dumps for 1.24.0.4930-ab6e1a058, I disabled Ombi’s connection to Plex the other day so the only thing remaining is Tautulli.

I’ve deadlocked 3 times already since upgrading to 1.24.0.4930-ab6e1a058. Downgraded to 1.24.0.4921-ce9f9dc95 to see if it stops.

I upgraded to v1.24.0.4930 last night and was able to turn on my Overseerr docker and allow it to do a full scan. So far, things seem to be running fine. No deadlocks as of yet. This is the first time I’ve been able to get a full scan to run for Overseerr in months. Hopefully we can see some other people’s deadlock issues resolved in upcoming versions too.

First Deadlock since upgrading to 1.24.0.4930 the day it was pushed out, this build seems to be a little better as it didn’t spam anywhere near as many connections as it has in the past @sa2000 I am still very interested in this ā€œFixā€ you mentioned last week is it likely to solve this or is it for a different deadlocking matter? Oh and I have sent you the latest captures

2 Likes

Same problem here. On nightly maintenance plex eats about 20-24gb ram and eventually get killed by OOM.

As mentioned to @Nathan909 this is a different problem to the overall thread so needs its own thread with logs posted.

Not obvious that this has occurred here - It was encountered after a long scan when adding / changing media paths for large library

We have looked into all the diagnostics and your issue is not a deadlock but very slow disk transfers for the database.

In both process dump snapshots there is a thread that is in kernel reading disk.

Perhaps there is a bad area on the disk - the database is in this directory
C:\Users\Plex\AppData\Local\Plex Media Server\Plug-in Support\Databases

Files

com.plexapp.pligins.library.db
com.plexapp.pligins.library.db-shm
com.plexapp.pligins.library.db-wal

So it could be some disk errors repeat action perhaps slowing access. Hoping we would see that from the windows event logs:

Export the Windows Event Logs (Application and System logs) - Run Event Viewer \ Select Windows Logs then System then Save All Events As and save into a .evtx file. Do the same for the Application log and zip the two exports and send me in private message

Could it be some anti virus software interfering with the file reads ?

This chart shows the time taken to handle a couple of specific requests with extensive delays starting at about 14:50 on the 8th of August
image

Suggest checking out the drive

Hi @sa2000 do you have instructions on how to do a process dump with Unraid Plex docker?

My latest deadlock has 680 connections right now

ouch mines not hit that high for a while :frowning:

What client is showing in the deadlocked connections?


Very rough excel, it was 1044 connections by the time I saved the file.

1 Like

Good news, I’m on 1.24.1.4931-1a38e63c6 and it’s been the first 24 hour block without any outages since the issue started for me! And that’s with 17 concurrent streams at one point last night!

2 Likes

How did you do that exel?

Jinxed myself, had another deadlock but it did properly crash not long after I made the dump.
@sa2000 added new folder for 1.24.1.4931-1a38e63c6 with dump+logs+connections

1 Like

It was unusable for most of yesterday (Saturday) including the morning, but it’s behaved itself since noon today (Sunday). Usually it’s only at night during peak hours when it deadlocks.

Saturday all day was bad for me too. connections kept climbing instantly to 200+ even after reboots and database optimizations etc.