Plex suddenly very slow and/or not loading anything

Server Version#: 1.41.0.8992
Player Version#: WebUI/Infuse/Any player basically
OS: Docker/K8s on TrueNAS

Had Plex running forever without major issues. Yesterday suddenly it stopped showing Movies and Episodes on my Library. It does show covers on the main screen (after a long loading time).

I saw there was an update so I did that but that did not fix things. Logs just show a lot of these lines:

Sep 18, 2024 17:55:10.561 [140716892969784] DEBUG - 6 threads are waiting on db connections held by threads: 140716895079224,140716865739576
Sep 18, 2024 17:55:10.580 [140716899285816] DEBUG - 6 threads are waiting on db connections held by threads: 140716895079224,140716865739576
Sep 18, 2024 17:55:10.762 [140716895079224] DEBUG - We're going to try to auto-select an audio stream for account 1.
Sep 18, 2024 17:55:10.762 [140716895079224] DEBUG - Selecting best audio stream for part ID 68909 (language: en)
Sep 18, 2024 17:55:10.762 [140716895079224] DEBUG - We're going to try to auto-select a subtitle for account 1.
Sep 18, 2024 17:55:10.762 [140716895079224] DEBUG - Subtitles: Found a candidate subtitle language [en] for a foreign film
Sep 18, 2024 17:55:10.762 [140716895079224] DEBUG - Audio Stream: 256579, Subtitle Stream: 256580
Sep 18, 2024 17:55:11.146 [140716882373432] DEBUG - 6 threads are waiting on db connections held by threads: 140716859607864,140716857498424
Sep 18, 2024 17:55:11.169 [140716902251320] DEBUG - 6 threads are waiting on db connections held by threads: 140716859607864,140716857498424
Sep 18, 2024 17:55:11.334 [140716857498424] DEBUG - We're going to try to auto-select an audio stream for account 1.
Sep 18, 2024 17:55:11.334 [140716857498424] DEBUG - Selecting best audio stream for part ID 69144 (language: en)
Sep 18, 2024 17:55:11.334 [140716857498424] DEBUG - We're going to try to auto-select a subtitle for account 1.
Sep 18, 2024 17:55:11.334 [140716857498424] DEBUG - Subtitles: Found a candidate subtitle language [en] for a foreign film

Full log: PrivateBin

So things sort of work sometimes. It’s just extremely slow loading views or files in both the WebUI or Infuse. Often Infuse will just time out. Changing pages in the WebUI from Library view into a single episodes for example takes 5-10 seconds.

lets start with a copy of your server logs instead of a cherry picked exerpt.

Here you go.

Plex Media Server Logs_2024-09-22_22-07-54.zip (3.2 MB)

Sometimes Plex seems to work but loading UI pages for media in my 2 libraries is extremely slow or times out completely. Same thing happens in Infuse.

Whenever a page finally opens I can actually play the file normally. But getting to it is the part that’s slow but more often than not times out.

I’ve also tried restoring a database from before this issue started but that did not matter.

If I try Infuse, I can do a speedtest. So I select the TV library folder, a show folder, and then finally a season folder. Whenever I click a season folder it takes 10-20 seconds to any MKV files to show up. This should also be near instant.

I see a lot of weird stuff in logs:

It took 132.0 sec to serialize a list with 15 elements.

15 threads are waiting on db connections held by threads: 139757461916472,139757466135352

We didn't receive any data from 172.16.0.1:60770 in time, dropping connection.
172.16.0.1 is the Docker/Kubernetes network IP of the TrueNAS machine.

App Version:
1.41.0.8992
Chart Version:
2.0.13

But the logs seem quite useless because it’s not actually telling me what it’s doing on which files and what DB operations etc…

Again, I did not change anything, this started happening out of the blue. I only tried updating to latest PMS after these problems started.

@Fossil Please disable verbose logging ASAP. Ill see if I can find anything, but verbose logs tend to flood the logs with clutter.

How big are your library.db and blobs.db respectively?

Ok will reply with more logs after I disabled it and tried playing some stuff.

library is 44MB
blobs is 656 MB

Have you tried using the troubleshooting feature called optimize database?

Yeah I did. Also tried restoring an older database from a week ago, before all this started but that made zero difference.

I have just dropped my TV and Movie libraries, cleaned trash/metadata/optimized DB and then re-added the TV folder. It’s scanning now, will check tomorrow but the UI still feels way too slow for something thats running on my local network.

If you haven’t made too much progress, you could actually delete the databases and start completely fresh

Same crap today. I setup a completely new Plex install in TrueNAS, added my libraries and it’s fast again, even while scanning for intros etc right now.

I love Plex, but they really need to provide better logging and more database options (MySQL/Postgres) versus SQLite, especially for paying users. I have had to restart from a fresh DB several times now over the last 5-7 years or so, which is completely unacceptable. No official support from Plex either, it seems their employees just randomly choose to which threads they reply on this forum.

The fact that this issue started while watching something and the fact there’s nothing useful in the logs is mind boggling.

2 Likes

same problem here with Kubernetes, is there any solution yet?

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