Latest Plex pass beta has a memory leak

Server Version#:Version 1.40.0.7775
Server OS#: Ubuntu 20.04 latest patches
Player Version#:latest

after installing Version 1.40.0.7775 a couple of days ago, every day my server locks up with an out of memory error and a reference to Plex on the screen. I am unable to login or access the server. A hard reboot is required. I have reverted back to Version 1.32.8.7639 for the time being. I have attached the logs

Plex Media Server Logs_2023-12-24_20-47-22.zip (3.4 MB)

Do you have a music library? If so check and see if disabling find lyrics in the advanced settings of the music library helps.

Disable the DLNA server if enabled. It has known memory leak.

Also, edit preference.xml and add LogMemoryUse="1".

See Advanced, Hidden Server Settings

LogMemoryUse
Values: 1/0
Description: Set Plex Media Server to log memory use and the system total used memory in Plex Media Server logs. A server restart is required for the change to take effect. Not recommended for normal usage. Requires PMS v1.20.2 or newer. (Not available for FreeBSD or NVIDIA SHIELD.) (Default is 0)
Example: 1.


Example log entry:
Dec 24, 2023 18:50:12.500 [0x7f1a587f3b38] DEBUG - Completed: [192.168.1.45:33518] 200 GET /status/sessions (13 live) TLS GZIP 9ms 4487 bytes (pipelined: 1) (Memory Usage: 239.0 MB/2140.0 MB)

same here but in windows. 4 days in a row I’ve woke up to a blank screen and an unresponsive system, with a system error “a new guard page for the stack cannot be created”.

Plex Media Server Logs_2023-12-27_07-34-07.zip (3.6 MB)

Here are today’s logs, I’ve added the memory log setting to my registry, to upload them again tomorrow when it happens again…

1 Like

Seeing the same thing with the recent beta on my W10 server. System goes down regularly at night although I haven’t dug into the logs yet.

1 Like

Plex Media Server Logs_2024-01-03_11-37-00.zip (4.2 MB)

Today it happened again. Woke up to a black screen and an unresponsive system, and had to force restart windows.
I think it has to be related to the addition of new albums, because these past days it didn’t happen, but yesterday I added some new albums and here we are, again.

@dhaslock You’ve network issues. Plex cannot maintain communications with hosts at plex.tv.

If possible, use wired Ethernet instead of WiFi.

Are you using a VPN, proxy, etc on your server?

Log Entries
Jan 03, 2024 08:53:34.701 [18172] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Resolving 172.104.245.130 port 443
Jan 03, 2024 08:53:34.701 [18172] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Resolved 172.104.245.130 to 172.104.245.130:443
Jan 03, 2024 08:53:34.701 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:34.701 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443/PubsubServerManager/getNextWorkingHost/fra] 2 total hosts available in region, starting tests
Jan 03, 2024 08:53:34.702 [18172] DEBUG - [EventSourceClient/connectiontester/172.105.245.178:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:34.702 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443/PubsubServerManager/getNextWorkingHost/fra] Switching to next host in region: 172.105.245.178
Jan 03, 2024 08:53:34.702 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Stopping.
Jan 03, 2024 08:53:34.703 [18168] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Resolving 172.105.245.178 port 443
Jan 03, 2024 08:53:34.703 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Resolved 172.105.245.178 to 172.105.245.178:443
Jan 03, 2024 08:53:34.703 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:34.704 [18172] ERROR - [EventSourceClient/pubsub/172.105.245.178:443] Retrying in 15 seconds.
Jan 03, 2024 08:53:49.715 [18168] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Resolving 172.105.245.178 port 443
Jan 03, 2024 08:53:49.716 [18168] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Resolved 172.105.245.178 to 172.105.245.178:443
Jan 03, 2024 08:53:49.716 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:49.716 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443/PubsubServerManager/getNextWorkingHost/fra] 2 total hosts available in region, starting tests
Jan 03, 2024 08:53:49.717 [18168] DEBUG - [EventSourceClient/connectiontester/172.104.245.130:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:49.717 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443/PubsubServerManager/getNextWorkingHost/fra] Switching to next host in region: 172.104.245.130
Jan 03, 2024 08:53:49.717 [18172] DEBUG - [EventSourceClient/pubsub/172.105.245.178:443] Stopping.
Jan 03, 2024 08:53:49.717 [18172] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Resolving 172.104.245.130 port 443
Jan 03, 2024 08:53:49.718 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Resolved 172.104.245.130 to 172.104.245.130:443
Jan 03, 2024 08:53:49.718 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.
Jan 03, 2024 08:53:49.718 [18168] ERROR - [EventSourceClient/pubsub/172.104.245.130:443] Retrying in 15 seconds.
Jan 03, 2024 08:53:53.632 [7652] WARN - MPM: ignoring preferred-interface pref due to no matching valid address

Also, not sure what this is, but looks like you’ve something trying to login to your Plex server.

Jan 03, 2024 03:25:02.308 [18172] DEBUG - Request: [106.75.133.231:54060 (WAN)]   (2 live) #61e5a TLS Signed-in
Jan 03, 2024 03:25:02.308 [18172] ERROR - Error parsing HTTP request: {"method":"login","params":{"login":"45JymPWP1DeQxxMZNJv9w2bTQ2WJDAmw18wUSryDQa3RPrympJPoUSVcFEDv3bhiMJGWaCD4a3KrFCorJHCMqXJUKApSKDV","pass":"xxoo","agent":"xmr-stak-cpu/1.3.0-1.5.0"},"id":1}
Jan 03, 2024 03:25:02.308 [18168] DEBUG - Completed: [106.75.133.231:54060] 400   (2 live) #61e5a TLS 0ms 265 bytes
Jan 03, 2024 03:25:11.590 [18168] DEBUG - Request: [106.75.133.231:58468 (WAN)]   (2 live) #61e5d TLS Signed-in
Jan 03, 2024 03:25:11.590 [18168] ERROR - Error parsing HTTP request: {"id":1,"method":"mining.subscribe","params":[]}
Jan 03, 2024 03:25:11.590 [18172] DEBUG - Completed: [106.75.133.231:58468] 400   (2 live) #61e5d TLS 0ms 265 bytes
Jan 03, 2024 03:25:12.835 [18172] DEBUG - Request: [106.75.133.231:18402 (WAN)]   (2 live) #61e5f TLS Signed-in
Jan 03, 2024 03:25:12.835 [18172] ERROR - Error parsing HTTP request: {"params": ["miner1", "password"], "id": 2, "method": "mining.authorize"}
Jan 03, 2024 03:25:12.836 [18168] DEBUG - Completed: [106.75.133.231:18402] 400   (2 live) #61e5f TLS 0ms 265 bytes
Jan 03, 2024 03:25:14.125 [18172] DEBUG - Request: [106.75.133.231:20394 (WAN)]   (2 live) #61e61 TLS Signed-in
Jan 03, 2024 03:25:14.125 [18172] ERROR - Error parsing HTTP request: {"id":1,"jsonrpc":"2.0","method":"login","params":{"login":"blue1","pass":"x","agent":"Windows NT 6.1; Win64; x64"}}
Jan 03, 2024 03:25:14.126 [18168] DEBUG - Completed: [106.75.133.231:20394] 400   (2 live) #61e61 TLS 0ms 265 bytes
Jan 03, 2024 03:25:15.410 [18168] DEBUG - Request: [106.75.133.231:22418 (WAN)]   (2 live) #61e63 TLS Signed-in
Jan 03, 2024 03:25:15.410 [18168] ERROR - Error parsing HTTP request: {"params": ["miner1", "bf", "00000001", "504e86ed", "b2957c02"], "id": 4, "method": "mining.submit"}
Jan 03, 2024 03:25:15.410 [18172] DEBUG - Completed: [106.75.133.231:22418] 400   (2 live) #61e63 TLS 0ms 265 bytes
Jan 03, 2024 03:25:16.660 [18168] DEBUG - Request: [106.75.133.231:24536 (WAN)]   (2 live) #61e65 TLS Signed-in
Jan 03, 2024 03:25:16.660 [18168] ERROR - Error parsing HTTP request: {"id":1,"jsonrpc":"2.0","method":"login","params":{"login":"x","pass":"null","agent":"XMRig/5.13.1","algo":["cn/1","cn/2","cn/r","cn/fast","cn/half","cn/xao","cn/rto","cn/rwz","cn/zls","cn/double","rx/0","rx/wow","rx/loki","rx/arq","rx/sfx","rx/keva"]}}
Jan 03, 2024 03:25:16.660 [18172] DEBUG - Completed: [106.75.133.231:24536] 400   (2 live) #61e65 TLS 0ms 265 bytes

@dhaslock You’ve network issues. Plex cannot maintain communications with hosts at plex.tv.
If possible, use wired Ethernet instead of WiFi.
Are you using a VPN, proxy, etc on your server?

Yes, I know. It’s something to do with my router, right now it’s impossible to wire the server to it, but it’s been like this for almost four years now, and doesn’t bother me much, because either the problems are at hours when we’re not using the server (most of the times) and fix themselves in a little time, or, I can just fix fix with a router reboot (our plex is mostly for use at home by me and my wife).
Can this be related to the system to get all the ram used and programs failing until the system completely halts? I’m not an expert, but neither complete illiterate, and I can’t think in how this can affect the memory leak…

No VPN, no proxy, nothing in between internet and the server. The router only has one port open and forwarded to the server (not the default), and just because I need remote connection to use plexamp and from time to time so that my girls can watch their cartoons at my in-laws. And this is what can be related to:

Also, not sure what this is, but looks like you’ve something trying to login to your Plex server.

I saw that also this morning when I checked the logs. For sure I don’t have any idea of what the f**k can that be. It looks like somebody is trying to send an http request at my IP : (port for plex), but it’s like its not for plex, and that’s why it says error parsing request? Because is not the right format - something plex would expect???
Also there are some references there for “mining”, so maybe it has something to do with something else that should use that port for crypto or something, and it’s a random attack at my IP to check if it’s there? I don’t know… I’m leaving today the same port setup so I can check the logs tomorrow again to see if it’s there again, and then I’ll change the port to another one…

I didn’t add anything to the server today, so I also expect that there will be no system collapse… tomorrow we’ll see.

Anyway, thanks for the help! I appreciate it!

Double check the LogMemoryUse setting. The info is not in the log files (look in Plex Media Server.log).

Regarding the network errors, I do not know if they are tied directly to memory usage. However, I think they are definitely causing some sort of problem.

Look at Plex Media Server.1.log. It is full of network error messages.

Also, this message appears 1949 times between 08:53 and 11:35, when you restarted Plex.
Jan 03, 2024 08:53:34.701 [18168] DEBUG - [EventSourceClient/pubsub/172.104.245.130:443] Failure: 10051 - Se ha intentado una operaciĂłn de socket en una red no accesible.

I’m seeing the same issue. Sometimes the OOM-killer will catch it and kill the process, sometimes it won’t. Running on Ubuntu 22.04.3 LTS. 32GB RAM, 8GB Swap, all filled during a scan.

# /var/log/syslog
Jan  1 06:49:02 fileserver kernel: [71848.478935] housekeeper invoked oom-killer: gfp_mask=0x1100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
Jan  1 06:49:05 fileserver kernel: [71848.478941] CPU: 0 PID: 2850 Comm: housekeeper Not tainted 5.15.0-91-generic #101-Ubuntu
Jan  1 06:49:05 fileserver kernel: [71848.478943] Hardware name: Dell Inc. PowerEdge T330/06FW8M, BIOS 2.2.3 08/17/2017
Jan  1 06:49:05 fileserver kernel: [71848.478944] Call Trace:
...OOM stack trace...
Jan  1 06:49:07 fileserver kernel: [71848.479091] Tasks state (memory values in pages):
Jan  1 06:49:07 fileserver kernel: [71848.479091] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
...
Jan  1 06:49:09 fileserver kernel: [71848.479282] [  46421]   113 46421  8841206  7043308 70873088  1775246             0 Plex Media Scan
...
Jan  1 06:49:09 fileserver kernel: [71848.479332] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=user.slice,mems_allowed=0,global_oom,task_memcg=/system.slice/plexmediaserver.service,task=Plex Media Scan,pid=46421,uid=113
Jan  1 06:49:09 fileserver kernel: [71848.479343] Out of memory: Killed process 46421 (Plex Media Scan) total-vm:35364824kB, anon-rss:28173232kB, file-rss:0kB, shmem-rss:0kB, UID:113 pgtables:69212kB oom_score_adj:0

Depending on the column, the memory values are 10-100x what anything else on the system is using (snipped my other processes for privacy reasons).

This wasn’t happening until I upgraded to 1.40.0.7775.

Thanks for reporting this - could you zip and send me by private message the media files relating to Edvard Grieg

It was a scanner job processings tracks for an artist that led to the issue.

The logs do not identify a specific track/media file

Are there a lot of files involved?

Appears to be similar issue to the one from @dhaslock

Can you see if this file is still available and if it is, zip it and let me have the zipped file and also zip of the media files referenced within the file
/tmp/756c-dca1-e279-b32f.txt

Sent!

It’s four files from my old wife’s library… that by the way, I just found out that it’s an utterly mess, completely disorganized… It’s setup to Personal Media Artists agent and prefer local metadata, so I’m thinking i will delete it and try to retag all her files and organize it better, but…

watching again at the logs (it happened today again), In today’s logs i haven’t found any reference to this files, but looking in the other’s day one, is the smoking gun the lines that refer to Doing expensive tags write…???

Because if yes, I found out that reference several times in today’s logs, but with another album that I added to my main music library two days ago, and that it’s perfectly organized, tagged in picard, and matched to the correspondent album in musicbrainz…

Plex Media Server Logs_2024-01-04_06-31-30.zip (3.7 MB)

Just in case, I’m attaching here today’s logs…

The logging is in the Plex Media Scanner Matcher log files

Different artist tracks - same issue

Léo Delibes

With regards to the ffmpeg [FFMPEG] - Unknown encoding errors , we have a fix that is in the process of being released as a hotfix to the beta

Same Problem here with the latest Beta. When i scan my Libary, the unraid server complete hangup when i scan my mp3s. I even cant login to my unraid server. And my wattage is normaly about 130-180W. When my plex crash it goes up to 350W. I Must kill my complete server. Its only with the latest beta. In my Plex Docker Log i found this:

audio frame (Invalid data found when processing input)
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Empty fingerprint
ERROR: Could not find any audio stream in the file (Stream not found)
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Not enough audio data
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Not enough audio data
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Empty fingerprint
ERROR: Error decoding audio frame (Invalid data found when processing input)
ERROR: Could not find any audio stream in the file (Stream not found)
ERROR: Empty fingerprint

Please could you run with debug logging enabled for the server and after this happens, restart and download the server logs zip and attach here. The fix we are releasing is for the repeated logged error [FFMPEG] - Unknown encoding -which were leading to high memory usage

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