# Plex Promox LXC Container leaking RAM

**URL:** <https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [March 19, 2024, 3:42am UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591 "2024-03-19T03:42:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyrh](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@andyrh](https://forums.plex.tv/u/andyrh)\
**Post date:** [March 19, 2024, 3:42am UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/1 "2024-03-19T03:42:15Z")

</div>

Server Version#: 1.40.1.8227  
Since install a little more than a month ago Plex has slowly leaked memory. The latest version did not stop the leak.  
I have found resizing the RAM for the LXC container will free the leaked memory without a restart or Plex. It has not run out of RAM so I do not know what will happen.

The image is from the Proxmox summary of the LXC. The only thing in the container is Plex.

 ![image](https://global.discourse-cdn.com/plex/original/4X/f/1/2/f122c6126babe44ef87f2b8f51fc11cdacd1e907.png)

[Plex Media Server Logs\_2024-03-18\_22-29-35.zip](https://forums.plex.tv/uploads/short-url/9gaVl7M8iXRrMa8bSwnmVj28Jyx.zip) (4.3 MB)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 19, 2024, 5:29am UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/2 "2024-03-19T05:29:49Z")

</div>

> [@andyrh](#):
>
> I have found resizing the RAM for the LXC container will free the leaked memory without a restart or Plex. It has not run out of RAM so I do not know what will happen.

May I ask, How you’re “resizing memory” ?

I ask because of how things get reported. Please look here.

1. It looks like PMS is using 164 GB of RAM when it’s not using anything near that much but the File Buffer RAM usage is high (as it should be)

 ![Screenshot from 2024-03-19 01-24-46](https://global.discourse-cdn.com/plex/original/4X/8/4/6/84689d947d24106e02d96d8ff116a7dd69ddc690.png)

1. If you do the following, does the memory utilization also return to normal ?

```auto
sudo sync; echo 1 > /proc/sys/vm/drop_caches
sudo sync; echo 3 > /proc/sys/vm/drop_caches 

```

You might want to do it this way

```auto
sudo bash
echo 1 > /proc/sys/vm/drop_caches
echo 3 > /proc/sys/vm/drop_cache
exit

```

---

<div class="post-metadata">

**Author:** ![andyrh](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@andyrh](https://forums.plex.tv/u/andyrh)\
**Post date:** [March 19, 2024, 11:20pm UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/3 "2024-03-19T23:20:45Z")

</div>

1. An LXC can be dynamically resized. Both CPU and RAM.
2. I see what you mean, I should have looked at the results of free.

```auto
free -m
               total used free shared buff/cache available
Mem: 3072 807 2136 0 128 2264
Swap: 0 0 0

```

As far as the original question is concerned that is solved. I should have known better. I will check in a week and see if this holds true, and I suspect it will. Thank you.  
My next question is why is the cache growing when there is no activity? I have checked the play history and during the night with no usage more RAM is used.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 19, 2024, 11:39pm UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/4 "2024-03-19T23:39:21Z")

</div>

To share -

I use LXCs instead of VMs.  
Well versed in what I can do which was why I asked 🙂

 ![Screenshot from 2024-03-19 19-35-22](https://global.discourse-cdn.com/plex/original/4X/c/2/1/c216ae220efc3965d7a33d6f88de5f4999c5d220.png)

PMS is almost always doing something.

- Library refreshes are on timers
- DVR / EPG updates are scheduled
- Task Scheduler has a whole bunch of things that run overnight.

Are you running this on a machine with only 4 GB of RAM ?  
If you’ve restricted the container to 4GB then I recommend you do what we recommend for all NAS processors – 8GB and forget about it.

---

<div class="post-metadata">

**Author:** ![andyrh](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@andyrh](https://forums.plex.tv/u/andyrh)\
**Post date:** [March 21, 2024, 12:16am UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/5 "2024-03-21T00:16:02Z")

</div>

Lots of things running an Proxmox, so all systems get the RAM they need. I tested Plex and I can successfully play 8 different 4k movies at the same time with 7 transcoding and that only needs about 2.5GB of RAM. My highest known real world session count is only 5.  
I have plenty of experience doing performance tuning and after my testing I know what happens when it runs out of RAM starting a session. I will up it if needed.  
Not checking the output of free before posting still bugs me, should not have missed that.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 19, 2024, 12:16am UTC](https://forums.plex.tv/t/plex-promox-lxc-container-leaking-ram/872591/6 "2024-06-19T00:16:16Z")

</div>

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