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
Admincraft Meta
Admincraft Meta8mo ago
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
Admincraft Meta
Admincraft Meta8mo 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 uekc#0
Skullians
Skullians8mo ago
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?
! Tiny Helius
! Tiny Helius8mo ago
What host are you using and maybe send logs. People here could find something useful in them. Maybe fix it.
Louis_Dew
Louis_DewOP8mo ago
I mean in the logs Yes, it suddenly stops, but it restarts instantly tho
Skullians
Skullians8mo ago
right that sounds like an OOM
Louis_Dew
Louis_DewOP8mo ago
Yes world goes back a few minutes
Skullians
Skullians8mo ago
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
Louis_Dew
Louis_DewOP8mo ago
I dont think thats the case tbh, my server always sits around using 7gb of ram and I gave it 16gb
Skullians
Skullians8mo ago
what does this say here
No description
Skullians
Skullians8mo ago
i'm assuming you're using a panel?
Louis_Dew
Louis_DewOP8mo ago
No description
Louis_Dew
Louis_DewOP8mo ago
yes
Skullians
Skullians8mo ago
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
Skullians
Skullians8mo ago
flags.sh
flags.sh
A simple script generator to start your Minecraft servers with optimal flags.
Skullians
Skullians8mo ago
remove the AlwaysPreTouch flag from the generated flags
Louis_Dew
Louis_DewOP8mo ago
But wouldn't it say that in the logs tho? What does that flag do? just curious Thank you!
Skullians
Skullians8mo ago
No, it is something in pterodactyl
! Tiny Helius
! Tiny Helius8mo ago
Better garbage collection as the one you have right now is not good.
Skullians
Skullians8mo ago
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 RAM
Louis_Dew
Louis_DewOP8mo ago
right Thanks a lot!!!
Skullians
Skullians8mo ago
np!
Louis_Dew
Louis_DewOP8mo ago
But its weird that all 16gb of ram gets used all of a sudden
Skullians
Skullians8mo ago
yes, it is
Louis_Dew
Louis_DewOP8mo ago
Why would that happen?
Skullians
Skullians8mo ago
most likely a memory leak from what? who knows
Louis_Dew
Louis_DewOP8mo ago
Is there's a test to determine what causes it?
Skullians
Skullians8mo ago
some notes: consider using ZNPCsPlus instead of citizens. Citizens is often quite laggy, and znpcsplus has a conversion tool for them
Louis_Dew
Louis_DewOP8mo ago
Amazing, i've been searching for an another npc plugin anyway :P
Skullians
Skullians8mo ago
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 stops
Louis_Dew
Louis_DewOP8mo ago
I'll do that, thanks!

Did you find this page helpful?