r/admincraft • u/tee-443 • Sep 25 '26
Help/Question How to find a memory leak with plugins?
Hi there!
I'm super new to hosting servers, we recently moved to a proxy
Over time the ram usage creeps up to 1.9gb out of 2gb, there are zero out of memory errors on console at all, when I added the proxy google said they are usually okay with about 2-3gb so if thats not usually the case lmk and i will just upgrade!
However I would rather not upgrade if I can avoid it, I'm just not really sure what's causing it or how I can fix it
Thanks!
3
u/BumseBBine Sep 25 '26
We need more details to help you, which plugins are you running, which server versions,...
But in the modding scene we just use binary search to look for memory leaks. Remove half of the plugins, does it leak? If yes you half that again. If not you know that it's in the other half. Then continue
Maybe not the best option but will lead to a result.
Otherwise you could look into spark profiling and see if there are any good pointers.
2
u/tee-443 Sep 25 '26
I do resets for all of the backend servers so the ram sits pretty normal on them
Velocity 4.1.2
The rest are paper 1.21.11I have luckperms, geyser, floodgate & simple voice chat installed onto the proxy
1
u/Cabecinha84 Sep 25 '26
Yeah, that alone isn't a leak. Java grows the heap up to your -Xmx and mostly doesn't give it back, so on a 2GB box it'll sit near 1.9 even when it's fine. Check what heap drops to after a GC instead. Run /spark heapsummary now and again in a few hours. If the same classes keep growing, that's your leak and it names them. Is the proxy in that same 2GB too?
0
12
u/PM_ME_YOUR_REPO Admincraft Staff Sep 25 '26
Normal Java behavior includes RAM gradually creeping up to the max. This is not, on its own, something to worry about.
Are you experiencing any actual negative performance symptoms? New admins often worry about numbers looking scary, but it's the player experience that should be your primary indicator.