QNAP excessive memory usage

Server Version#: 1.20.5.3600
Player Version#: 4.46.2

I was having trouble with my old QNAP server and I thought it might be due to the memory I was using.
I upgraded to a QNAP TS-453D with 8Gb factory installed.
I still keep getting excessive memory use from Plex and the QNAP kills the process.

Warning 2020-11-18 17:45:02 — 127.0.0.1 — --- [System Message] PlexMediaServer has been automatically disabled by QTS to free up system memory.

I’m sorry but we’ll need more to go on than just that to determine what is going wrong.

  1. Please restart Plex
  2. Let sit completely idle for 5 minutes (to guarantee full startup completion & steady state).
  3. Download the logs ZIP file (Settings - Server - Troublshooting - Download Logs
  4. Attach that ZIP file.

I have the same problem.

For a few hours the NAS works properly. After 6-8 hours the NAS is completely inactive.
The connection by SSH takes 30 minutes.
Running htop takes 20 minutes.
The system has no free memory or resources.
I cannot access qnap by web, or by any method.

After getting access to htop I see that ./plex_media_server.sh is consuming + 40% memory with multiple processes.

I am trying to kill the plex processes but it takes a long time. When I succeed I try to restart the system and I will try to obtain the plex logs of the last hours to see if you, as great experts, find any anomaly.

Maybe it will help … I don’t know.

I have finished all the processes. The NAS memory has returned to normal. I have already been able to enter the Qnap UI and reactivate Plex.

I have obtained the logs. I hope it helps to try to locate the problem.

PlexMediaServer.1.log may help you.
(File removed)

@ciltocruz

You do need to stop using the Multimedia shared folder.

Multimedia is a software defined shares and does not work properly with PMS.
Every time QTS updates, it causes PMS to lose where your media is.

The best solution is to properly sort your media into shared folders which you create.

Nov 19, 2020 22:51:04.706 [0x7f110d11f700] ERROR - Couldn't find the file to stream: /share/CACHEDEV1_DATA/Multimedia/Videos/Series/El hombre en el castillo (2015)/Season 2/El hombre en el castillo - S02E01 - El cubil del tigre.mkv

Default transcode duration of 120 minutes???

Nov 19, 2020 22:51:05.467 [0x7f1104987700] DEBUG - Using default transcode duration of 120 minutes
Nov 19, 2020 22:51:05.467 [0x7f1104987700] DEBUG - Using default transcode duration of 120 minutes

A proper duration should be 120 seconds (2 minutes).

This is a possible source of your memory problems. The transcoder temp, if using /dev/shm (memory) would fill up.

Hi @ChuckPa
Where is these option?

You show it right there on the screen you posted.

Transcoder tempory directory would be specified as /shm/tmp if you were using memory.

How much memory is actually in this system?

(command line free -m ? )

Tonight the NAS appears to have crashed again. I have managed to enter with a lot of patience through SSH. This is what HTOP is showing right now.

I have a Qnap HS-251+ with 2GB of RAM.
It’s not much, but I’ve never had memory problems until this week when I installed the Plex Media Server update.

Memory state before “killing” the plex process.

Memory state after “killing” the plex process.

free -m
 total       used       free     shared    buffers     cached
Mem:          1885       1797         88         40        254        300
-/+ buffers/cache:       1241        644
Swap:         7583        678       6905

I was looking for the box to set the 120 minutes. I cannot find it as indicated in this guide https://support.plex.tv/articles/200250347-transcoder/ (Advanced Settings section)
Where can I change the 120 minute option?

But my image is the same as yours. And according to my logs it seems that I have something that activates 120 minutes…
If I don’t know where to modify that value, I will not be able to change it.

change the value there & click SAVE

Now retype again and make it 61 and save again.

From this we can track down if a player is requesting it

I am attempting to reproduce the memory issue if possible.

Thanks @ChuckPa

Going over the thread again:

  1. 724 MB of RES (resident) memory usage is correct. I have 729 MB so all is good.
  2. 5423 MB of Virtual size (max size it could be) is correct
  3. With the program there and running, it hasn’t “Crashed” (how we define process failure in Linux terms)
  4. It not being responsive is the way to state it: “Running but not responding”.

Questions:

  1. Is the DLNA server enabled? (it is a known memory leaker and turned off by default)
  2. What other apps are running & installed in that 2GB ? (2 GB is absolute minimal and 4-8GB is considered the norm for NAS systems)

DLNA is deactivated.

QNAP programs are running.
The most powerful can be programs like HBS3 and Container Station.

But … 8 days ago I had the same programs.
Right now Plex is running normally alongside those programs.
Right now Plex is consuming 4.9% memory.

The feeling I have is that it may be related to operations that Plex does at night (Scheduled Tasks).

Look at my logs uploaded yesterday from this line. Strange connection errors start from this line. I don’t know if they are caused by Plex or the NAS. Regardless, Plex at this point is when memory usage increases.
Nov 21, 2020 05: 11: 22.533 [0x7f4ae4855700] DEBUG - Activity: updated activity 8d54f15e-3712-459a-9e93-327a8ac054af - completed 93.7% - Detecting intros

You are doing something different than I.

You are using Intro detection. I do not.

If there is a problem, it will be there as it’s different for us.

I will try and see what happens.

I’ve had intro detection since it was created. It started not working. Then it worked very well and right now could it be what causes the problem?
OK.
I try to turn it off and see what happens on Sunday night to Monday…