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
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
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)
Quark has made 73mb worth of objects but I don't see anything realllly bad here
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
crashes with error code 137
/spark health
is the command you’d use to check
How much ram did you allocateoh that does not mean leak...
that just means it ran out of memory
6.5gb
docker?
what's docker?
uhhh
what host are you using
witherhosting
docker.
okay yeah
how much ram does the container itself have
like
if it's a host, it's a docker 🐳
8gb
hmmm
what are you running
Modpack?
paper?
have you tried resetting all your JVM flags
how many players too
this is the modlist
this too.
Also try aikar flags if not already
yes, several times
sometimes I like to just run with default JVM flags just to test
how many players
I have tried those as well
it may be less efficient but
eek
usually crashes at around 4
mmmmh
is it possible this modpack just needs more than 6.5gb
^
not really as I've run larger modpacks on similar servers before
although 2gb heapdump is very suspicious
wdym?
try make a heapdump when the ram usage is actually high
well 2gb heapdump implies the heap was around 2gb when it was taken
sooo
^^
everything is fine if you're only using 2gb, it won't throw 137
pretty sure that heapdump was made when the panel said 8gb/8gb being used
a heapdump is literally a dump of everything in ram into a file
means nothing
you gotta use spark health
what does spark health do?
yeah
shows the actual ram usage
shows the actual ram usage
the panel shows the ‘allocated’ reserved memory
ensure your flags do not contain alwayspretouch
and if you're using aiker flags this will always be the maximum possible
(I think)
i'm not a Minecraft server hoster lol
these are my flags
if you have always pre touch enabled yes
and
mmmm looks fine
try set the xmx to 5500mb
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
i've always found that mc servers in general tend to increase usage over time
that's what we've been doing the past week
because they suck
I can try and get back on to run /spark health in a bit
cpu makes a big difference as well
the cpu is much stronger than any server ive previously used so I dont think its that
what if the other servers you had are running on a 15 year old i3