error code 137
Running a heavily modded, 8gb 1.20.1 Forge server through Witherhosting, and it crashes very randomly with the exit code 137. Sometimes it will crash when a new person joins, sometimes just randomly when we're not doing anything in specific. Here are the startup arguments I have for it:
java -Xms128M -XX:MaxRAMPercentage=70.0 -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+UseContainerSupport -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s "-jar server.jar" || printf %s "@unix_args.txt" )
Here are some Spark profiles:
https://spark.lucko.me/dXbtNQ71xo
https://spark.lucko.me/x85cSTC3AC
https://spark.lucko.me/c15qaZpfQb
https://spark.lucko.me/pagJTnQMTq
https://spark.lucko.me/T62Hhsnn5O
https://spark.lucko.me/zX4mTnRpBn
What is causing this crash and how do I fix it?
Aikar's Thoughts
JVM Tuning: Optimized G1GC for Minecraft - Aikar's Thoughts
Learn more about my In depth study on tuning the G1GC garbage collector to be optimized for how Minecraft servers run, and keep low pause efficient usage.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
63 Replies
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by ethonodon
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
and this is the modlist
are there any recent files in the crash logs folder
there is no crash logs folder
also, instead of using
-XX:MaxRAMPercentage=70.0
, I'd recommend just doing -Xmx6G
instead for your startup flagsthis is whats in the logs folder
for some reason it does let me change the arguments
even if I copy paste those identical arguments, it won't let me apply them
I've been trying to contact witherhosting staff about it all day
what node are you on?
wdym?
in the panel it should show what node you're on (somewhere), it'll be something like
NYC-5B
NYC-3P
why do you ask?
was just making sure the node wasn't like running at 100% cpu usage
realistically though, you may just have a mod that has a memory leak
how would I find that mod?
want to try starting a profiler with
/spark profiler start --alloc
what would that do?
- /spark profiler start --alloc
to start the profiler and profile memory allocations (memory pressure) instead of CPU usage.
from https://spark.lucko.me/docs/Command-Usage#-profilerhow long should I let that run?
just like a minute
any less and spark somtimes complains and won't let you upload the profile
heres the new one: https://spark.lucko.me/ZdGjkW4XEi
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by ethonodon
server crashed just a couple seconds after it finished
Modrinth
Memory Leak Fix - Minecraft Mod
A mod that fixes random memory leaks for both the client and server
do those need to be installed clientside too?
nope
alright
do the spark profiles have any useful info?
they probably should be
it’s a good idea to put them on the client though
but they don't need to be
alright
nothing really stood out, but it should be a good reference point to see if memory pressure went down
(it was really just entities in the world)
wdym
entities were > half
it was about 56%
like ram usage?
so memory pressure just refers to how much memory was allocated by a function
not nessicarily persistant, but because of how Java GC works, if a function allocates too much memory, then you'll be able to observe GC pauses or high CPU usage caused by GC
and if no memory can be freed, then the server will crash
in one of the earlier spark reports you sent for example, your server had ~1 second lag spikes every 30 seconds because of GC
do we know what might've been causing that though?
after you install those two mods, if you want to make a new spark profiler with
--alloc
again, we can check if it's improvedalright
will the statistics it shows change significantly depending on the amount of players online?
the amount of chunks loaded/entities loaded will change it, yeah
chunks/entities cause memory usage, not necessarily the players themselves
yeah
it's been crashing a lot when a fourth or fifth person joins
but then also sometimes it will jsut crash randomly
ah yeah just crashed again when a third player tried to join
here's the new spark profile: https://spark.lucko.me/ZdGjkW4XEi
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by ethonodon
and was that with or without ferritecore/memoryleakfixer installed?
yes
and I told all the players to install it on their clients as well
and I did too
Spark doesn't show them as being installed
that's weird
yeah they're installed alright
idk why it says that
oh wait thats the wrong one
this is it: https://spark.lucko.me/YbgR1ikTUQ
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by ethonodon
sorry mb
I think this is it at least
just realized too :KEK:
yeah, if you can, I'd possibly see if they could raise the
-Xmx
flag to like 7G
because you're running out of memory on the heapI dont have an xmx flag I dont think
these are my flags
you'd remove the
-XX:MaxRAMPercentage
and replace it with -Xmx
alright ill try that
and take another profile with that too?
if you want to, realistically at this point, I'm moreso curious about the GC times and not really the memory pressure
you could also try lowering the view distance/simulation distance, but that's a subpar solution
yeah that's not a good solution
what is GC time again?
just the red numbers here
so what spark command should I use?
just a normal profile would be fine
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Forge
Requested by ethonodon
crashed again when someone tried to join
at this point would nuke the server, add a small chunk of mods, test for an hour, if it doesnt crash add a few more, test for an hour, rinse and repeat be a good way to try and find out what's causing issues?