Any tips on finding a memory leak?
We run Minecraft inside a tmux session using a bash script to start it.
tmux new-session -s server
/home/mcserver/serverfiles/start.sh
Link to the bash file: https://pastebin.com/raw/GbBd7sct
The server has 8GB ram. Slowly overtime it uses more and more RAM until it consumes all of it and causes an OOM. It consumes more than is allocated to it. We tested this by allocating 4GB and it used up to 7GB.
We have a lot of mods so I'm assuming one of them is causing a memory leak somehow? Is there any way or any tools that would help us find the culprit?
Link to the mod list: https://pastebin.com/raw/4GCEbWV1
Server Info:
OS: Linux VPS
Distro: Debian 12
CPU: AMD Ryzen 7 5800X - 2vCPU @ 3.8 GHz
RAM: DDR4 8GB Ram
Storage: 120 GB NVME
Thanks in advance!13 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by olliecrook#0
dont use always pretouch
its mc + jvm overhead
try setting xms below xmx
if you have a hard cap
I'll try both of this things ty!
Generated the flags from https://flags.sh/ if there is somewhere else we should be doing it?
I have applied both of those changes. I will leave the server running and see what happens 🙏
do you have a hard limit on the server?
the physical memory / ram limit on your server set by your host
8GB
OS?
Debian
linux/windows
linux
Debian recommended is 512MB but I'm leaving 1.5GB for OS
So far it seems to be doing the trick but the server has been idle. It should get played on again tonight so I'll report back again
hmm no we're still having issues 😦
https://spark.lucko.me/
run the profiler for a bit and show results
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
/spark profiler start --alloc
Awesome okay. That was going to be my next step anyway 👌