Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Plex memory issues when adding media?

Featured Replies

Hey Guys,

 

Have a weird one here, I think I might have come across a memory leak with Plex?

 

I had a couple of GB allocated to my VM as per IronicBadgers awesome guide but I seem to keep running out of memory so I increased it to 5GB just for testing.

 

               +                OS: Arch Linux x86_64
               #                Hostname: ArchApplianceVM_v3
              ###               Kernel Release: 3.13.5-1-ARCH
             #####              Uptime: 5:45
             ######             WM: None
            ; #####;            DE: None
           +##.#####            Packages: 168
          +##########           RAM: 427 MB / 5009 MB
         #############;         Processor Type: AMD FX(tm)-8350 Eight-Core Processor
        ###############+        $EDITOR: nano
       #######   #######        Root: 3.3G / 14G (23%) (ext4)
     .######;     ;###;`".
    .#######;     ;#####.
    #########.   .########`
   ######'           '######
  ;####                 ####;
  ##'                     '##
#'                         `#

[root@ArchApplianceVM_v3 ~]#

 

I am still however getting errors like the following when adding my media to the library:

 

This is the first couple from when I added my TV library

[root@ArchApplianceVM_v3 ~]# [20487.518750] Out of memory: Kill process 5081 (python) score 559 or sacrifice child
[20487.518764] Killed process 5081 (python) total-vm:3772976kB, anon-rss:2862612kB, file-rss:504kB
[20487.560648] Out of memory: Kill process 5671 (Plex Media Scan) score 355 or sacrifice child
[20487.560657] Killed process 5671 (Plex Media Scan) total-vm:2193792kB, anon-rss:1818940kB, file-rss:484kB

 

It doesn't seem to affect the overall operation of Plex as after a reboot of the VM things seem to be fine once the scan completes however I don't subscribe to the theory of "Ignore it and it will go away" so I would love some advice if anyone has any so I can get rid of the issue altogether?

 

Cheers

 

v

Weird. Doesn't happen here and I have 11TB of movies and TV shows it has to scan...

 

There are others here with much larger libraries who have also had success. No idea!

  • Author

Very odd...

 

Oh well worst case I can spin up a new vm, but I will see how I go.

 

On a side note Given I have 8 CPUs available do you think it would be worth allocating 8 vcpus to the vm for transcoding and have time splicing step in as required if I say spin up a windows VM with 4 vcpus allocated for gaming? Or would I be better to allocate 4 vcpus to each?

 

 

Sent from my iPad using Tapatalk

Try it. My guess is you won't be able to tell the difference

 

Sent from my S4 via Tapatalk

 

 

The recently released version of plex lets you perform maintenance on your collection to keep things running smooth.

  • 2 weeks later...

Just thought I would chime in on this as I too have had this issue occur just recently and during the same sequence (initial library scan).

 

Badger, you said you havent had any issues, but when you did this, did you port your Plex config over to avoid doing a complete library rescan or did you do one from scratch and have no issue? 

 

That said, I would not tweak the memory settings at all on the ArchVM for right now.  Mine is based on Ironics build as well and I was able to get up to 7 concurrent transcoding streams (over wireless mind you) before I started seeing some stuttering. Again, only 2GB ram, 2 vCPUs assigned.  Streaming / Transcoding are by far a more resource intensive function than doing a library scan.  My guess at this point is the memory leak is either due to the ArchVM, Xen 4.3.1, or something else quirky with beta 3. This is not a plex issue at least not in my mind.  The next test would be to build a different VM under a different linux OS to see if the same issues occurred. If so, we could rule out Arch as the culprit.

 

I may attempt this some time in the not too distant future, but considering that this leak only seems to affect library scans so far and my library is all set right now (the mem leak seems more random in nature), this is low priority for me to test right now.

 

That said, if anyone has a suggestion for an alternate OS than Arch to test Plex on, please let me know and I will add this to my to do list...

 

Sent from my LG-V500 using Tapatalk

 

 

I am using the tretflix vm appliance with plex, sabnzbd, couchpotato and nzbdrone with 4gb ram (out of 6GB) allocated.

I have about 7 TB Movies/TV and some music being shared. Very simple to set up and works well.

 

Tony

Hmmm is it always the offending application that is kill when OOM? I thought the OOM kill decisions are based on priority and not which is eating mem?

 

I ask because if that is true, then you might be blaming the wrong process and won't be able to solve the problem.

I am using the tretflix vm appliance with plex, sabnzbd, couchpotato and nzbdrone with 4gb ram (out of 6GB) allocated.

I have about 7 TB Movies/TV and some music being shared. Very simple to set up and works well.

 

Tony

 

In my use of badgers arch VM, I am only using Plex. It is the only "app" I installed. Not saying its definitely the culprit and I haven't been able to recreate the issue consistently.  Not 100% sure of the root cause just yet. Will need to review my logs next time it happens.

 

Sent from my Nexus 5 using Tapatalk

 

 

hmmm fair enough.  Smarter people than me will be needed to help you put in the right logging to watch memory to see what process is actually the hog.  And it could be plex, but it just isn't a problem a lot of people are seeing so it might be an interaction with something else you have going on with the VM [shrug].

Not sure if anyone else is still having this issue since upgrading to beta 4, but I went through the process of trying to recreate the issue and was unable to do so.  Maybe it was a bug related to xen 4.3.1 resolved in 4.3.2 as implemented in beta 4.  If anyone else has a memory leak issue when using plex on the ArchVM badger provided, please let us know.

Been running Beta 4 for some time now.  No issues with memory leaks / plex VM problems.  Has anyone else had any issues?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.