# PMS potential memory leak on linux

**URL:** <https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [April 11, 2020, 5:15pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297 "2020-04-11T17:15:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 11, 2020, 5:15pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/1 "2020-04-11T17:15:20Z")

</div>

Server Version#: 1.19.1.2645  
Player Version#: Plex Web 4.22.3  
[Plex Media Server Logs\_2020-04-12\_00-48-50.zip](https://forums.plex.tv/uploads/short-url/L8MKI0kpEfkj4JNJV2Wi5Rf9kp.zip) (4.4 MB)

At start, I restarted PMS docker, at the time my server used around 1.8 GB ram. After watching half day live TV, the total ram increase to 2.66 GB ram. During the period I didn’t do anything, but watching live TV. I can directly see the ram slowly growing with time by monitor through htop and glances output. Each time I close the live TV, PMS only free partial ram.

 ![image](https://global.discourse-cdn.com/plex/original/3X/a/4/a43b5c64f5694a809b076cecac58b6defcd7d49d.png)

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 12, 2020, 4:45am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/2 "2020-04-12T04:45:27Z")

</div>

No one responds?

---

<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:** [April 12, 2020, 5:22am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/3 "2020-04-12T05:22:54Z")

</div>

Sorry, but 1am here on the holiday weekend.

Can this wait until Monday?

I happened to be writing a support doc.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 12, 2020, 5:59am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/4 "2020-04-12T05:59:42Z")

</div>

Of course this can wait, as long as one is following this issue.

---

<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:** [April 12, 2020, 6:15am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/5 "2020-04-12T06:15:29Z")

</div>

Can you think of / find a way to recreate some of what you see?

Is it confined to an activity (e.g. transcoding) or further refined (if transcoding) to a particular codec?

Anything you can help provide helps me. There is so much which could go wrong and “leak” it’s really pretty impossible to find it without knowing where to look.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 12, 2020, 6:32am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/6 "2020-04-12T06:32:17Z")

</div>

What I see? Is this refers to my live TV content, or what I see on my server?

From my server, I can see it’s transcoding.

![image](https://global.discourse-cdn.com/plex/original/3X/5/f/5f6e62f8206643d523b52cfcf61e74e8a12c81ce.jpeg)

---

<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:** [April 12, 2020, 7:00am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/7 "2020-04-12T07:00:36Z")

</div>

I’m about to sleep here.

How do you substantiate “memory leak”.  
What evidence do you have?

I need to have some technical information to work with.  
Can you help me by providing something like that?

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 12, 2020, 7:06am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/8 "2020-04-12T07:06:29Z")

</div>

No smoking gun here. Only point out that the memory of PMS keeps increasing with time. It’s very hard to have solid evidence confirm memory leak.

Have a good night.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 16, 2020, 6:10am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/9 "2020-04-16T06:10:22Z")

</div>

Hi, what’s the status now?  
The memory still continue growing. Around Monday, PMS’s memory has increased to 1 GB. As you can see the screenshot on Apr 12, the PMS’s memory was only 572M.  
But unfortunately I don’t have screenshot or data now, because I accidentally unplugged the server power at that day, PMS have been restarted all over again.

---

<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:** [April 16, 2020, 4:54pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/10 "2020-04-16T16:54:49Z")

</div>

Everything here is still running fine. PMS isn’t growing, memory isn’t leaking otherwise.

There is, as you stated, no smoking gun **until such time** as a pattern emerges.

The only thing anyone can do is keep notes and see if that pattern emerges.  
Once a pattern does to limit the scope then more progress can be made.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 16, 2020, 5:29pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/11 "2020-04-16T17:29:53Z")

</div>

I think I can 100% reproduce this problem. When there is time to deal it, I will give you detailed data. And, I think programmers should check their code, and there are many tools can help them to check memory leak.

BTW, I only find this problem in live TV.

---

<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:** [April 16, 2020, 6:01pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/12 "2020-04-16T18:01:26Z")

</div>

> [@silencly07\_gmail\_com](#):
>
> And, I think programmers should check their code, and there are many tools can help them to check memory leak.

1. Code is reviewed
2. Code is checked by automated tools.

Are you a coder or a developer?  
Insulting is not going to gain any points here.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 17, 2020, 4:56am UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/13 "2020-04-17T04:56:26Z")

</div>

I don’t see why I’m insulting? I only point out some fact, is it hurt to someone?

I don’t think so, unless you think the fact is hurt.

The fact is I can always reproduce this problem, and you tell me PMS is still running fine, which is not the case in my opinion.

And I think the code need to be check, now you say it’s reviewed and checked, which is good.

My apology I can’t see insulting here, program always have bugs, it’s normal thing.

Are you mean I said the code need to be checked means programmer isn’t good enough, or something else?

I can’t see why it has that kind of meaning. Like I said, it’s a normal thing to me.

BTW I don’t need to gain point, I need problem go away.

---

<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:** [April 17, 2020, 2:21pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/14 "2020-04-17T14:21:36Z")

</div>

How do you reproduce the problem ?

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 17, 2020, 4:12pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/15 "2020-04-17T16:12:52Z")

</div>

I have descried some above. I’ll double check all the steps and collect the memory data, and give you all the data and steps.  
But you have to wait some days. Currently, I have some other things on my hand.

---

<div class="post-metadata">

**Author:** ![castrojo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/castrojo/32/4192_2.png) [@castrojo](https://forums.plex.tv/u/castrojo)\
**Post date:** [April 17, 2020, 8:09pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/16 "2020-04-17T20:09:51Z")

</div>

This looks like normal behavior, if there was a leak you’d see the memory usage continue to climb and then dip into the swap and then Plex would get OOM killed.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 24, 2020, 4:27pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/17 "2020-04-24T16:27:11Z")

</div>

It’s been a week. I collected some data in these two days.

Let’s see first screenshot.

 ![2020-04-23_21-25](https://global.discourse-cdn.com/plex/original/3X/2/b/2b0b5b6ad5f0e8a832c6f2cf1ff17ab140fa6799.png)

In this screenshot, you can see the uptime is 9 days. Last time I said I accidentally unplugged the power, the uptime begin with this exactly day. During those 9 days, I didn’t use plex at all, but even though the memory of PMS still grows to around 851M.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 24, 2020, 4:30pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/18 "2020-04-24T16:30:18Z")

</div>

The reproduce step is easy:

1. Setup live TV
2. Click ‘Live TV & DVR’
3. Click ‘GUIDE’
4. Play live TV channel.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 24, 2020, 4:43pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/19 "2020-04-24T16:43:50Z")

</div>

![2020-04-24_14-25](https://global.discourse-cdn.com/plex/original/3X/d/8/d81f785a2cc4ba85eb45f494042fda2631850a96.png)

Next screenshot, in this screenshot I restarted server and PMS. You can see in this period, the memory usage was very low.

Note: in this screenshot, the uptime is around 13 hours.

---

<div class="post-metadata">

**Author:** ![silencly07\_gmail\_com](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/silencly07_gmail_com/32/181046_2.png) [@silencly07\_gmail\_com](https://forums.plex.tv/u/silencly07_gmail_com)\
**Post date:** [April 24, 2020, 4:55pm UTC](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297/20 "2020-04-24T16:55:05Z")

</div>

![2020-04-24_15-58](https://global.discourse-cdn.com/plex/original/3X/3/c/3c5214c279dc82a6d9780d23e785a3c1e3c26b4c.png) ![2020-04-24_16-29](https://global.discourse-cdn.com/plex/original/3X/6/5/658aab1d0a906ef81f88cd5c46de7de3ea76d6de.png) ![2020-04-24_20-29](https://global.discourse-cdn.com/plex/original/3X/2/3/236d64425c2e0749375e7a0ba4055b24e99a6622.png) ![2020-04-25_00-11](https://global.discourse-cdn.com/plex/original/3X/b/f/bfb5d77959a4769f0a0b9bc12eca452e9c57eb1f.png)

In this 4 screenshots, you can see PMS’s memory usage is gradually growing. At the last screenshot, the uptime is 23 hours. The test begin with uptime 13 hours, after 10 hours passed, the memory usage become around 1 GB and never free them once (from what I can see).

[Next page](https://forums.plex.tv/t/pms-potential-memory-leak-on-linux/572297.md?page=2)
