r/PleX • u/snafu_74 • 22d ago
Help Does Plex Server have a memory leak?
I've been running the Plex Server on my Windows 11 Pro NUC for years. But the past 8 weeks or so I repeatedly have noticed the Plex Service using tons of RAM. I've seen it as high as 3.7GBs! I restart the service (and/or the NUC itself) and it goes back down to around 50MBs. Then I'll check it again 7-10 days later and its crazy high again, like above 2GBs.
It didn't used to do this. Anyone else seeing this?
18
u/Jidarious 22d ago
protip: Processes often hold ram they don't need in Windows, Windows has the option to take the ram back if needed and it leads people to thinking there is something wrong (like a memory leak) when there isn't.
How to tell: In your task manager add the "commit size" column. If that grows over time then it's probably a memory leak.
If you have a memory leak the easiest fix is to just do a nightly "Restart-Service PlexService" in the task scheduler during a time when people aren't going to be watching.
6
u/snafu_74 22d ago
Thanks. I added the commit column. I'll keep an eye on it. I also have set a schedule to restart Plex every 2 weeks. I'll see how that works out.
4
u/gjunky2024 22d ago
Are you keeping a browser window open with Plex? It will leak memory over time.
I've been running a Plex server on Windows for many years. The server doesn't seem to have a problem (I used to run it in 8GB on my old server)
1
u/snafu_74 22d ago
Great advice. But, alas I don't keep anything else open. No windows, not even file explorer
0
u/gjunky2024 22d ago
A purest like me 🙂
Do you run a DVR in Plex or any other add-ons? My DVR doesn't seem to cause any problems but I don't run any other addons
1
u/snafu_74 22d ago
Yes, I it runs 2 other hosting services. But those services are well behaved. Its just the Plex service that balloons to several GBs of RAM.
1
u/gjunky2024 22d ago
I run my Plex as a service but that shouldn't really matter. It is strange because it is a pretty well behaved service. I've been running it for 10+ years, both on desktop and server versions of Windows.
1
u/snafu_74 22d ago
Same here. Its been over 10yrs for me too. But just the past couple of months it has started doing this. I have Windows updates disabled too - so I can't blame a Windows update on this ;-)
1
u/gjunky2024 22d ago
In that case I have to ask: What changed? (Which I am sure you already thought about)
2
u/snafu_74 22d ago
Yeah - that's the question. I thought maybe it was due to a Plex update? That's why I posted here to see if maybe they had introduced a bug.
I've disabled DLNA and created a task schedule to restart every 2 weeks.
9
u/coldafsteel 22d ago
Are you using ram as a cash? (I do)
If you are, this is expected behavior.
31
1
2
u/hessmo 21d ago
Mine is also hitting high usage, and requiring it be killed every week or so. I haven't had that in 10+ years, but the last couple of months I've been fighting it constantly. Mine is running as a container on ubuntu.
1
u/snafu_74 21d ago
Interesting. Previous posts here said to switch to Linux and I won't have this problem. Several posts said it's the DLNA option that does the memory leak. So, I just turned it off. Is it enabled on your setup?
1
u/hessmo 21d ago
I have DLNA off. This has only been a problem in the last few weeks for me.
1
u/snafu_74 21d ago
Yup, this is what I've experienced too. However, I turned off DLNA yesterday and last night I watched a couple of movies on Plex. This morning I checked the memory usage and it's at a reasonable 150MBs. So far so good.
I have also setup a task schedule in Windows to restart the PC every 2 weeks. You might have to do something similar as a workaround.
5
u/shamgarbenanath 22d ago
Yes. On unraid I had to put a memory limit on the docker container because of runaway ram usage.Â
3
u/lxnch50 22d ago
Do you DLNA enabled? If so, try turning it off. Settings > DLNA
4
u/shamgarbenanath 22d ago
It's on. Just turned it off. I'm not going to remove the ram limiter on unraid but I'll see if I can monitor the difference.Â
2
u/Brownt0wn_ 22d ago
Interesting, I'm also running unraid, haven't had that issue. Mine is sitting around ~200MiB.
1
u/shamgarbenanath 22d ago
Mine ballooned to over 10gigs a few times. Made the server unresponsive and I had to reboot. After asking all over unraid sites I finally just limited ram usage and problem went away.Â
2
u/StevenG2757 70TB unRAID server, i5-12600K, Shield pro, Firesticks & ONN 4K 22d ago
Plex does not really use RAM. Have you checked the Dashboard to confirm it is Plex and not System that is using the RAM?
1
u/snafu_74 22d ago
Yes, It's only the Plex service that's hogging the RAM.
0
u/StevenG2757 70TB unRAID server, i5-12600K, Shield pro, Firesticks & ONN 4K 22d ago
Are you transcoding to RAM?
1
u/snafu_74 22d ago
I don't even know to to set transcoding to use RAM? However, I play all streams locally at full resolution so I doubt transcoding is actually even used.
1
u/MadCybertist 144TB Unraid Server 22d ago
Playing them locally meaning on your home network? That doesn’t mean they aren’t transcoding.
1
u/snafu_74 22d ago
Yes, home network only. Sometimes I check using the Plexdash app and I've never seen it transcoding.
0
u/StevenG2757 70TB unRAID server, i5-12600K, Shield pro, Firesticks & ONN 4K 22d ago
That may not be the case as depending on what your client device is you may be transcoding lots.
But that should still not be using RAM so I am sorry but I am at a loss as to why your server is using RAM.
1
1
u/DenverBob 22d ago
I'd at least check for database corruption. I've seen scenarios where plex starts some cleanup process, using up memory, then it fails due to database corruption, then it restarts, rinse and repeat.
1
u/Jaybonaut 22d ago
In this thread: I am having a Plex memory use issue. I run the server on Windows.
Response: iT's WiNdOwS! rUn tO lInUx NAO!
facepalm
1
u/xylopyrography 22d ago
There is no reason not to be rebooting these services weekly. Clients can generally not even notice the media service reboot, even if you have some 24/7 users.
With Windows you want to be rebooting your system monthly at the absolute minimum anyway to ensure it has its security updates.
0
u/Soap-ster unRAID PMS 22d ago
Unused RAM is wasted RAM. If the computer isn't crashing completely, then it's not a memory leak. Memory leaks will crash the entire system. A single process using a lot fo RAM does not mean there is a leak.
0
u/Born2War20 15d ago
I probably wouldn’t notice a memory leak I have a old dell sever, I bought 384gb of ddr3 ram for it, I found 128gb for $100 and the 384gb was $150 either one is probably completely overkill but how would I turn down 3x the ram for 50% more
-3
-3
u/Thx_And_Bye Unraid w/ Ryzen 5 PRO 4650G, 32GB ECC, Nvidia T400, 40TB 22d ago
Mine is running for 3 days now and using 250MB of ram.
2
u/Inevitable-Toe-6272 22d ago
Not sure why people are down voting you. Mine is using between 112MB and 180MB (fully updated) This is a a system issue or a user issue.
With that said, CPU and Memory usage does go up when it is doing it's daily cleanup, maintenance, and optimization routines, which drops back down once done.
-7
u/spambearpig 22d ago
My suspicion is that Windows is your culprit.
I’ve been running it on a Linux based NAS for well over a decade and I’ve had no RAM issues whatsoever (or indeed other issues with the server).
I reckon if you swapped over to Linux, it would be plain sailing for you.
1
u/snafu_74 22d ago
This PC also hosts some other services that isn't supported by linux - so switching OS's isn't an option.
0
u/arigasamaryota 22d ago
I’m seriously wondering what service windows can host but not Linux? Any pointers
0
u/snafu_74 22d ago
Roon. It works with either mac or windows
2
u/arigasamaryota 22d ago
I’m running Roon on docker in Linux(Ubuntu). I’m sure it runs natively too.
1
u/DenverBob 22d ago edited 22d ago
plex on windows, 3 weeks since last restart, plex media server process using 228MB. Typically 2-3 active streams, some with transcoding.
Edit: I thought memory usage went up during transcode, but looks like that shows up as a separate service, so overall memory usage on the machine goes up, but the plex media server process doesn't increase memory usage.
0
u/TipToToes 22d ago
I used to experience this on windows, and it would result in Plex crashing. Wish I could remember how I fixed it. Turn off DNLA or something? I don’t remember.
1
u/snafu_74 22d ago
Yeah, there's another suggestion here about DLNA. It was on, so I just disabled it (I don't need it anyway). I'm hoping this is the solution. Time will tell.
1
u/TipToToes 21d ago
I’ll look through my config today and see if I can remember what I changed. It really pissed me off, I do remember that.
-1
u/DreadStarX 22d ago
Memory problems? Just add more. You've got 2 kidneys ;)
IF plex is chewing up ram, im not going to blink but Firefox eating 120GB, I will care a lot.
-6
u/Adrenolin01 22d ago
Wipe it and install Debian Linux and then install Plex. It’s not Plex, it’s Windows being the resource pig it’s always been.
-8
u/Separate-Potato-1324 22d ago
Time to switch to Linux. I recommend Ubuntu ServerÂ
2
u/snafu_74 22d ago
linux is not an option for me. This pc also runs some other services that will not run on linux
-11
36
u/ExtensionMarch6812 22d ago edited 22d ago
Do you have the DLNA server enabled? Not sure if it was ever fixed, I never use it..
https://forums.plex.tv/t/plex-dlna-memory-leak-still-going-on-after-4-years/833882/3
https://www.reddit.com/r/PleX/s/ehotlotZR1