Slow or unresponsive Plex Debian Server

So it’s not the issue you thought?

Any other ideas? could this have been that I didn’t have sqlite3 installed previously and it was falling back onto something else?

Nope. you don’t have a bloated database.

Maybe have LOT of media (Media item 223881 is a hint :wink: ) but no bloated extras at least

Ye, I think that’s mainly down to the music, might just look at removing that, but no issues to report now anyway.

I’ll be back with any further :laughing:

Is there context missing from what you asked me to do?. .

@biljiczop_protonmail_com

Context? Asked you to do?

Please clarify. Is this where you intended to post?

I found your post in the moderator-review queue

I believe I’ve been having a similar issue with my Plex installation:

Mine doesn’t come back automatically after time though. I’ve left a putty session open running top so that I can see what the resource usage looks like when it happens, and it always shows plex using 90%+ of memory which causes kswapd to start spiking the CPU, causing the whole system to slow down to a crawl. I’ve been trying to figure out whats been causing this for about a week now on my own, but I really haven’t seen anything.

I tried running that sqlite command and got the following:

root@valhalla:/plex/config/Library/Application Support/Plex Media Server/Plug-in Support/Databases# echo ‘select count(metadata_item_id),metadata_item_id from metadata_relations group by metadata_item_id order by count(metadata_item_id) desc limit 20’ | sqlite3 com.plexapp.plug-ins.library.db
Error: near line 1: no such table: metadata_relations

I’m running Server Version 1.25.2.5319 on Ubuntu 18.04.6.

TO ALL:

Big fat :man_facepalming: on my part

echo ‘select count(metadata_item_id),metadata_item_id from metadata_relations group by metadata_item_id order by count(metadata_item_id) desc limit 20;’ | sqlite3 com.plexapp.plugins.library.db

I mistyped the file name

:roll_eyes:

it’s .plugins. , not plug-ins UGH

Also missing the ;I think, same issue I had

yep. (This is what I get for working over my vacation time)

1 Like

I’m guessing I might have that bloat issue…

786433|42572
62|44224
59|36901
59|42318
55|42645
52|31301
52|52713
51|43212
49|44222
48|44266
47|42692
45|41924
45|42650
44|42810
44|43258
43|39759
41|42543
41|43005
40|39957
40|41966

Yes, you do. Media item 42572 is the problematic one.

Please check your PM.

We appreciate your help though, I looked at your profile when you were helping me, thinking why is he here :laughing:

I have the same symptoms but I don’t think I have the same issue with database extras -
62|58834
60|8226
55|19783
52|6241
51|6043
49|5991
47|31385
45|6032
45|28326
44|6040
44|6056
44|27305
44|75687
43|6226
41|26934
40|8028
40|35119
39|6035
38|6029
37|44915

@andouk have you figured out your issue yet?

@mmissey

Your database is great. Those are within the range. Left column is the number of extras for the media item (right column)

Impacted databases have been 500.000+ extras. (wildly high)

Ok that’s what I thought. I can’t figure out what is happening though.

Like OP I am running a LinuxServer/plex container on a Debian box.
Xeon E5-2660 @ 2.20GHz x2
64GB ECC RAM
500GB SSD for boot and database

I transcode in RAM - the volume is mapped to /dev/shm

For the past month or so I’ve been having an issue where the server becomes unresponsive. Navigating to the web interface times out, any client playing a video gets “Server not responding”. Restarting the docker container solves the issue (and luckily restarts much faster than OP - 15 seconds).

This never seems to happen at random times - instead it’s when I try to direct play something locally on either my Apple TV or Apple TV 4K. Usually once a day.

Just before the latest hang I see this in logs

Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 03c36161-86d4-4a10-ac6e-c58b8fd8e6bd - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 09b0c46b-9d89-494f-b9d7-048dc832036b - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 15d297ad-b4dc-47be-a8e2-2b8b50fd6015 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 16c67f4f-9dcf-43a2-b9ee-4013d1e2725a - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 1e3024ef-8045-404e-88b4-00db9e86eaa6 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 219e2114-a172-47ce-8317-0c251913b237 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 2d1c6a79-9a76-4d4b-806f-0c635f40fdbc-1 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 3cf29b66-090a-40e7-8b81-e32cc0938c0b - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 3d447786-3dda-4416-a1d6-f95cede7ba38 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 434b2862-3991-40da-8a0a-b73687d9b261 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 4b898ee1-a62a-44dc-9794-5055aa6a9d58 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 4fded669-a7b5-4edc-900c-374a98f6ce2d - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 660924be-bf3e-4980-bfeb-945e2352761f-1 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 660924be-bf3e-4980-bfeb-945e2352761f-4 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 746d09b3-e129-4f61-bb38-6554b9cb7937 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 816021ea-88dc-4223-bd68-66157ad33c9a - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 819006d2-c437-4660-afeb-e4871e56c691-1 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 819006d2-c437-4660-afeb-e4871e56c691-4 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 89b6de7f-f785-44d9-a56f-288fd9b29262-331 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 915b9a25-1559-4528-97c9-538e81e12d6d - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - 97b74851-cd8a-478d-b837-053d2387f8b1 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - a3fd9dbf-c375-4d19-9469-1fc5f8dc21f3 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c1af9840-a5f4-403e-ad82-d4b912511b82-1 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c1af9840-a5f4-403e-ad82-d4b912511b82-323 - 2 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c1af9840-a5f4-403e-ad82-d4b912511b82-531 - 5 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c1af9840-a5f4-403e-ad82-d4b912511b82-700 - 68 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c1af9840-a5f4-403e-ad82-d4b912511b82-907 - 18 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - c76745a8-88b5-4640-895d-c5a8f2d2c673 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - e5a36545-79a6-4ca6-9cdc-e2aef1d44082 - 1 active item(s)
Jan 12, 2022 16:49:53.103 [0x7f9a732bbb38] VERBOSE - [IDLE] * transcoder - edbbd421-78ae-4956-b191-9840f5cc1cda - 1 active item(s)

With 1 direct play and no transcodes

Around the time of hang I also see

Jan 12, 2022 16:51:34.345 [0x7f9a728ecb38] ERROR - Network Service: Error in browser handle read: 125 (Operation canceled) socket=-1
Jan 12, 2022 16:51:34.445 [0x7f9a728ecb38] INFO - Network Service: Abandoning browse socket, it was closed.
Jan 12, 2022 16:51:34.446 [0x7f9a728ecb38] ERROR - Network Service: Error in browser handle read: 125 (Operation canceled) socket=-1
Jan 12, 2022 16:51:34.546 [0x7f9a728ecb38] INFO - Network Service: Abandoning browse socket, it was closed.
Jan 12, 2022 16:51:34.546 [0x7f9a728ecb38] ERROR - Network Service: Error in browser handle read: 125 (Operation canceled) socket=-1
Jan 12, 2022 16:51:34.646 [0x7f9a728ecb38] INFO - Network Service: Abandoning browse socket, it was closed.
Jan 12, 2022 16:51:34.646 [0x7f9a728ecb38] ERROR - Network Service: Error in browser handle read: 125 (Operation canceled) socket=-1
Jan 12, 2022 16:51:34.746 [0x7f9a728ecb38] INFO - Network Service: Abandoning browse socket, it was closed.
Jan 12, 2022 16:51:34.746 [0x7f9a728ecb38] ERROR - Network Service: Error in browser handle read: 125 (Operation canceled) socket=-1
Jan 12, 2022 16:51:34.846 [0x7f9a728ecb38] INFO - Network Service: Abandoning browse socket, it was closed.

Some things I’ve noticed -

  • since putting my server behind Cloudflare it looks like LAN traffic is coming in from my external IP. I do have “Treat WAN IP As LAN Bandwidth” checked - this change might line up with when these issues started time wise but I can’t be sure
  • The “Plex Media Server” process slowly takes up more and more RAM. This might just be a https://www.linuxatemyram.com/ thing
    top output:
    Screen Shot 2022-01-12 at 9.51.11 AM

My issues have gone now, never did figure out what it was, the only thing changed was I upgraded the plex server to v1.25.2.5319-c43dc0277

I’ve not had a timeout or disconnect since, apart from when maintenance is running, but that’s at stupid o’clock in the morning and clears up after a minute or so

I have the exact same symptoms, seemingly (haven’t 100% confirmed yet) only when transcoding to RAM, and it only happens when I start streaming something locally. I can have 10 users all streaming remotely without a problem but as soon as i start watching on the LAN i start to get issues that culminate in the server completely crashing. Only way to get back is to restart the docker container completely. I’d love to hear if you get any resolution.

I updated the image to latest a few days ago and as far as I can tell the issue has resolved. I’ll follow up if it happens again.

Running 1.25.3.5409 now

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