Memory Full

How much would a human memory engram dump occupy if digital? A few hundred MB ?

1 Like

idk, but SPEND THE MONEY for a decent name brand :slight_smile:

1 Like

Thanks ChuckPA! You are the best member.
Here’s the current:

              total        used        free      shared  buff/cache   available
Mem:          15913        9317        1634         237        4961        6029
Swap:          2047           0        2047

FYI… I also am upgrading my daily pc(not PMS) but with an AMD Ryzen 7 1700. Not quite the 3000. :slight_smile:

ok chuck.
Here is my current memory status. It doesn’t look normal to me.

              total        used        free      shared  buff/cache   available
Mem:          15913       15388         151         126         373         132
Swap:          2047        2045           2

Not running anything crazy. Playing one video at a time and maybe a recording in there. Haven’t changed anything since my last post.

Ok… Now we’re going to use regular top (not htop)

What we need to look at is the RES (resident) value.

Except for color, you should see this:

What is the VIRT and RES size for Plex’s processes ?

130GB is a lot! that’s a leak. Let’s force it down

  1. Make certain Crash Uploading is enabled (Settings - Server - General)

  2. sudo kill -11 1122 (plex’s pid)

This will force the signal and the dump will kick in. Upon restart, it will upload

When it uploads, the Crash Uploader will send it all up.
The tracking information will be in that very first “Plex Media Server.log” file .
Grab it please (about 2-3 minutes after restart)

@sa2000 Might you assist here please?

Running headless here. So not sure how to enable step 1.

SSH tunnel into it. Same technique used when setting it up the first time.

ssh -L 8888:127.0.0.1:32400  ip.addr.of.host

sign in and let it sit

open http://127.0.0.1:8888/web in your local browser

ran the code

ssh -L 8888:127.0.0.1:32400  192.168.1.201

and wasn’t able to get it to open in a browser. I didn’t use this method when installing. I installed with a monitor, but I always run into graphics issues and had to use a nomodeset to get it thru the install. But then I continued to run into constant display issues. So that’s why I just run headless.

However, when I ran the above code, my memory cleared out.

              total        used        free      shared  buff/cache   available
Mem:          15913        3616       10003         126        2293       11874
Swap:          2047         741        1306

:confused:

I have not read all the posts here so i am not sure if we do have a script running capturing memory usage but we need to start an investigation of a suspected memory leak, is:

#!/bin/sh
while sleep 30s
do
now=$(date +"%D %T")
mem=$(ps -p $1 -o drs=)
echo $now "," $mem "\n" >> mem_snapshots.log
done
  • shutting down Plex Media Server and then re-launching it, finding the PID of the Plex Media Server process and then passing it as parameter to the shell script above
  • waiting 60 seconds and seeing that the script is ok capturing memory use into file mem_snapshots.log every 30 seconds
  • with this script running and debug enabled
  • wait until huge amount of memory has got occupied (suspected leak)
  • capture logs zip and attach with that mem_snapshots.log file
  • no harm in also getting a forced process core dump (see Understand and configure core dumps on Linux - Linux Audit for general advice on core dumps)

(initially the logs with the mem_snapshots.log file could be enough to start an investigation)

This is a little beyond my knowledge. Would love to help, but have no idea of where to even start.

@sa2000

PMS has grown to 130GB process memory usage so I do suspect a leak over a 24 hour period.

1 Like

I am mobile - travelling at the moment - @ChuckPa will help you put the shell script in płace. I have not checked the platform but hopefully your environment gives the desired ‘ps’ command filtering for a PID and we can test that and run the script

Once the script is working then we go through ensuring debug logging is on and we have server restarted and find the PID number for the Plex media server process and then run the script with the PID number as the parameter

Then we wait for the memory to climb eg 24 hours later and capture the logs and copy out the memory snapshots file the script was writing to and attach with the logs zip

No need for dump at this stage

My memory built up again. :frowning_face:
I’m accessing my server via putty. If you can help me get the information you need, I’m more than willing to help. Just gonna need some assistance as I’m not very well versed in linux.

              total        used        free      shared  buff/cache   available
Mem:          15913       15233         168         156         511         253
Swap:          2047         676        1371

Here is a simple shell script

  1. cd
  2. cat > memory-watcher
#!/bin/sh

while [ 1 ]; 
do
 date  >> ~/memory-watcher.log
 free -m >> ~/memory-watcher.log
 echo ' ' >> ~/memory-watcher.log
 sleep 60
done
  1. Press CTRL-D (to close it and return the prompt
  2. chmod +x memory-watcher
  3. To invoke
./memory-watcher &
  1. It will run in the background.
  2. to stop it,
kill %1    (this should be job #1 of your terminal session)

To view the output:

cat ~/memory-watcher.log

got it! i tested and it gives me a running log.
do you want me to restart the server and then start this script?

yes please

Thanks!
I restarted and ran the script.
It looks like it has been taking about 24-48 hours for the memory to fill. Once a huge amount is memory is occupied, I will upload the logs.