What's causing my memory leak?

I've got a heap dump, which I've been told can point out the cause of my server's memory leak. I sent it to my host's support staff as well, but communication with them has been difficult and my players are eager to get the server working. Heap dump: https://mega.nz/folder/QssnSZLA#AYqxCUPJTDPO4_MHyyG0lA
56 Replies
Admincraft Meta
Admincraft Meta3mo ago
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 ethonodon#0
Skullians
Skullians3mo ago
Use something like eclipse memory analyser. Download the zip file, bump up the xmx in the .ini file and run the exe. Then File > parse heap dump and once it finishes click on the leak suspects report Xmx must be >= the size of the heapdump (you need the same amount of ram as the size of the heap dump available, preferably a little more additionally)
Loudbook
Loudbook3mo ago
No description
Loudbook
Loudbook3mo ago
Quark has made 73mb worth of objects but I don't see anything realllly bad here
Skullians
Skullians3mo ago
yeah a 2gb heap dump is rather small What makes you think you have a memory leak remember the ram usage shown on your panel is not how much MC is actually using
Ethonodon
EthonodonOP3mo ago
crashes with error code 137
Skullians
Skullians3mo ago
/spark health is the command you’d use to check How much ram did you allocate
Loudbook
Loudbook3mo ago
oh that does not mean leak... that just means it ran out of memory
Ethonodon
EthonodonOP3mo ago
6.5gb
Skullians
Skullians3mo ago
docker?
Ethonodon
EthonodonOP3mo ago
what's docker?
Skullians
Skullians3mo ago
uhhh what host are you using
Ethonodon
EthonodonOP3mo ago
witherhosting
Loudbook
Loudbook3mo ago
docker.
Skullians
Skullians3mo ago
okay yeah how much ram does the container itself have like
Loudbook
Loudbook3mo ago
if it's a host, it's a docker 🐳
Ethonodon
EthonodonOP3mo ago
8gb
Skullians
Skullians3mo ago
hmmm what are you running Modpack? paper?
Loudbook
Loudbook3mo ago
have you tried resetting all your JVM flags
Skullians
Skullians3mo ago
how many players too
Ethonodon
EthonodonOP3mo ago
this is the modlist
No description
Skullians
Skullians3mo ago
this too. Also try aikar flags if not already
Ethonodon
EthonodonOP3mo ago
yes, several times
Loudbook
Loudbook3mo ago
sometimes I like to just run with default JVM flags just to test
Skullians
Skullians3mo ago
how many players
Ethonodon
EthonodonOP3mo ago
I have tried those as well
Loudbook
Loudbook3mo ago
it may be less efficient but eek
Ethonodon
EthonodonOP3mo ago
usually crashes at around 4
Skullians
Skullians3mo ago
mmmmh
Loudbook
Loudbook3mo ago
is it possible this modpack just needs more than 6.5gb
Skullians
Skullians3mo ago
^
Ethonodon
EthonodonOP3mo ago
not really as I've run larger modpacks on similar servers before
Loudbook
Loudbook3mo ago
although 2gb heapdump is very suspicious
Ethonodon
EthonodonOP3mo ago
wdym?
Skullians
Skullians3mo ago
try make a heapdump when the ram usage is actually high
Loudbook
Loudbook3mo ago
well 2gb heapdump implies the heap was around 2gb when it was taken sooo
Skullians
Skullians3mo ago
^^
Loudbook
Loudbook3mo ago
everything is fine if you're only using 2gb, it won't throw 137
Ethonodon
EthonodonOP3mo ago
pretty sure that heapdump was made when the panel said 8gb/8gb being used
Skullians
Skullians3mo ago
a heapdump is literally a dump of everything in ram into a file
Loudbook
Loudbook3mo ago
means nothing you gotta use spark health
Ethonodon
EthonodonOP3mo ago
what does spark health do?
Skullians
Skullians3mo ago
yeah shows the actual ram usage
Loudbook
Loudbook3mo ago
shows the actual ram usage
Skullians
Skullians3mo ago
the panel shows the ‘allocated’ reserved memory ensure your flags do not contain alwayspretouch
Loudbook
Loudbook3mo ago
and if you're using aiker flags this will always be the maximum possible (I think) i'm not a Minecraft server hoster lol
Ethonodon
EthonodonOP3mo ago
these are my flags
No description
Skullians
Skullians3mo ago
if you have always pre touch enabled yes and mmmm looks fine try set the xmx to 5500mb
Ethonodon
EthonodonOP3mo ago
I tried that too one of the problems with this issue is it takes so long for it to start crashing we'll play for five or six hours before it finally crashes with error 137 and then after it crashes, every time it starts back up it will crash within 5 minutes and then atp we usually completely reset the server and try something else
Loudbook
Loudbook3mo ago
i've always found that mc servers in general tend to increase usage over time
Ethonodon
EthonodonOP3mo ago
that's what we've been doing the past week
Loudbook
Loudbook3mo ago
because they suck
Ethonodon
EthonodonOP3mo ago
I can try and get back on to run /spark health in a bit
E3VL
E3VL3mo ago
cpu makes a big difference as well
Ethonodon
EthonodonOP3mo ago
the cpu is much stronger than any server ive previously used so I dont think its that
Loudbook
Loudbook3mo ago
what if the other servers you had are running on a 15 year old i3

Did you find this page helpful?