Serious memory leak with 1.18.8

Server Version#:1.18.8
Qnap TVS-1272XU

After running for a couple of hours, I have to dump the application, and restart it in order to free up all of the memory use. Just installed this update today, and have had the issue ever since. Yes, I have rebooted as well. No go.

1 Like

Went back to 1.18.7. Still, the longer plex runs, the more memory the task eats up until all memory is consumed.

Define ā€œLeakā€.

Linux never leaves memory complete ā€œfreeā€. It will find a use for it and then report what it’s using it for. Windows doesn’t tell you that.

That gui is not 100% accurate.
There is a difference between Virtual size and Resident size.

Open a ssh session to the QNAP and report back what free -m shows you.

Thanks for your input. Its a legit leak (defined in my second post). The Plex Media Serv process eats up all the memory, then things start failing due to the lack of it. It just started happening when I updated to 1.18.8. But, its still there with 1.18.7. I killed everything else, and it just keeps eating.

I have a TS-453Be running the most recent QTS and Plex server. Several days now since latest plex version released.

I have no memory issues.

Curious do you have DLNA off?

Until I see evidence of a memory leak, (which I do not have on my QNAP) there is no leak.

Present the evidence / proof please.

DLNA is off for all new installations by default.

Show me this output:

[~] # free -m
             total       used       free     shared    buffers     cached
Mem:         32099      31732        367        331      13964       8153
-/+ buffers/cache:       9614      22485
Swap:        32056        139      31916
[~] # 

What I show above is normal Linux operation.
Linux will use all but a few hundred MB of memory as disk read-only i/o buffers.
This read caching is free and improves overall performance.

When an application needs actual memory, these disk buffer pages are the first to be reclaimed. It takes 4 lines of source code in the kernel (about 15 CPU instructions) to reclaim a disk buffer page.

This is after plex has run for a couple of hours:

[~] # free -m
             total       used       free     shared    buffers     cached
Mem:         32080      31312        767        410        284       3595
-/+ buffers/cache:      27432       4648
Swap:        32056          0      32056
[~] #

I stop the plex server, then re-run it:

[~] # free -m
             total       used       free     shared    buffers     cached
Mem:         32080       9036      23043        410       1645       3523
-/+ buffers/cache:       3867      28212
Swap:        32056          0      32056

May I have the Logs (ZIP) as they exist right now? I will start looking through them.

If you can help chronicle your activities, it will be very helpful.
I’ll be able to start attempting to replicate.

What I’m having trouble with is that my PMS, currently active and streaming, still shows

[chuck@lizum ~.505]$ free -m
              total        used        free      shared  buff/cache   available
Mem:          32035        5837        1421        8418       24776       17312
Swap:         62499         290       62209
[chuck@lizum ~.506]$ 

I have been running 1.18.8 on QNAP, transcoding HEVC -> H.264 with 7.1 -> stereo.

Start:

[chuck@lizum ~.523]$ date ; free -m
Tue 24 Mar 2020 10:09:57 PM EDT
              total        used        free      shared  buff/cache   available
Mem:          32035        6153        1022        8442       24859       16971
Swap:         62499         291       62208
[chuck@lizum ~.524]$ date ; free -m
Tue 24 Mar 2020 10:10:22 PM EDT
              total        used        free      shared  buff/cache   available
Mem:          32035        6282         877        8441       24874       16843
Swap:         62499         291       62208
[chuck@lizum ~.525]$

End:

[chuck@lizum ~.542]$ date ; free -m
Tue 24 Mar 2020 10:34:31 PM EDT
              total        used        free      shared  buff/cache   available
Mem:          32035        6279        1006        8444       24750       16844
Swap:         62499         291       62208
[chuck@lizum ~.543]$ 

I have created the log file zip. I would like to send direct if that is ok.

I’m experiencing this memory overusage as well.

Plex doesn’t stream anything, it’s just running and eating up some enormous slice of the memory.

htop shows that 4526M RES (!) memory is consumed. It’s 28.3% of all RAM. And it makes things to swap, leading to the overall performance severe degrading. It forces me to stop the process.

If something looks like a bug it’s most likely a bug.

Let’s try this if using the QSV hardware transcoding.

  1. Stop Plex
  2. Go to the ssh shell level
  3. cd /share/CA*/.qpkg/Plex* ← saves a lot of typing :wink:
  4. cd Library/Plex*
  5. edit Preferences.xml using vi (not from across the network with Windows)
  6. add VaapiDriver="i965" right before the closing /> on the last line.
  7. save and exit

If there is an issue with anything in the iHD_drv_video mechanism,
memory usage will remain stable.

Depending on NAS model (J3xxx based) do have the typical ApolloLake problems when the bit rate is > 80 Mbps (a bit of surging during peak CGI scenes)

I need to follow up with this, since I opened this thread up to begin with. My issue was related to my using my work’s VPN. I have no idea what it is/was doing, but when the VPN app was running (Watchguard mobile VPN with SSL), my connection to myserver appeared to be disconneting/reconnecting repeatedly. I did not see any evidence of that happening, but the log file showed repeated re-connects with PLEX, and each time, it would allocate another chunk of memory. DIsconnecting the VPN would resolve the issue.

Since that time, I have not noticed the issue. However, I did also up my memory to 64GB, and I havent really been checking when I’m on my VPN.

Special public thaks to @ChuckPa for his analysis of my log file and top shelf help!

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