Server crashing at random moments
So recently my server has been crashing at random moments. There’s also nothing to see in the console. Here’s a spark profiler https://spark.lucko.me/oDIt8QvVAn
I’d really appreciate any help!!!
Thanks!
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
31 Replies
Spark Profile Analysis
These are not magic values. Many of these settings have real consequences on your server's mechanics. See this guide for detailed information on the functionality of each setting.
✅ Your server isn't lagging
Your server is running fine with an average TPS of 20.
Requested by uekc#0 • Page 1 of 5
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 uekc#0
by nothing to see in the console, what do you mean?
does the server just suddenly stop? does your world save go back a few minutes?
What host are you using and maybe send logs. People here could find something useful in them.
Maybe fix it.
I mean in the logs
Yes, it suddenly stops, but it restarts instantly tho
right
that sounds like an OOM
Yes world goes back a few minutes
an OOM is an out of memory exception
basically, your host's machine detects that your server has used all of its available memory
and subsequently kills the process
it doesn't care about corruption or anything
in your panel
I dont think thats the case tbh, my server always sits around using 7gb of ram and I gave it 16gb
what does this say here
![No description](https://cdn.answeroverflow.com/1256346910441340940/image.png)
i'm assuming you're using a panel?
![No description](https://cdn.answeroverflow.com/1256346970453184562/image.png)
yes
right so
at some point, your server's RAM is rising so far that it reaches the container cap (16gb)
it is most definitely an OOM
with the fact that the world gets rolled back
consider using aikar flags, and set your Xms / Xmx to ~14gb
remove the AlwaysPreTouch flag from the generated flags
But wouldn't it say that in the logs tho?
What does that flag do?
just curious
Thank you!
No, it is something in pterodactyl
Better garbage collection as the one you have right now is not good.
when it ends, pterodactyl will say "Server detected as crashed! ... something here...
out of memory: true
"
but it won't be in the latest.log, and if you don't have the console open when it happens you won't see it
it preallocates all the RAMright
Thanks a lot!!!
np!
But its weird that all 16gb of ram gets used all of a sudden
yes, it is
Why would that happen?
most likely a memory leak
from what? who knows
Is there's a test to determine what causes it?
some notes:
consider using ZNPCsPlus instead of citizens. Citizens is often quite laggy, and znpcsplus has a conversion tool for them
Amazing, i've been searching for an another npc plugin anyway :P
you can make an allocation spark profiler
/spark profiler start --alloc
if you have a general idea when the crashes happen (e.g. high player counts), start a profiler then
you'll have to stop the profiler before the server stopsI'll do that, thanks!