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

Did you find this page helpful?