Continuous Purpur Thread Dumps, related to memory?
I keep having these weird thread dumps and OOM crashes on my server which are causing it to lock down entirely, requiring me to have to use the kill button in Pterodactyl. I have configured Aikars flags to limit the RAM usage of the server (I pay for 6 GB, Xmx is set to 5GB), and I've tried doing some profiling to no avail. All I know is that each thread dump referenced the UUID of one of our Admins who was just exploring. Any ideas? I'm at a loss, I really don't know what's going on at this point. I thought it may have been BlueMap because it's the most "resource intensive" thing I've done recently but I uninstalled that plugin and still have issues. I've also tried pregenerating chunks with Chunky, but I think that may be making it worse.
Plugin List:
Output of /version:
And a snippet of the logs that keep being spit out has been attached as well.
40 Replies
Please use a paste service instead!
Paste services are more mobile friendly and easier to read than just posting a log file
message.txt
Requested by terrorbytetw#0
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 terrorbytetw#0
Thanks buddy β€οΈ
Currently, my memory usage is stable at 5.01 GB / 6 GB utilized, however when these crashes are happening, memory is spiking to 6.01 and the OOM killer is nuking the server :\
I can provide Spark profiles if needed, as well as full logs and whatever else
Common cases when OOM Killer kills a server:
not enough memory for the server OR not enough memory for Java itself.
The first case means a memory leak is possible here. Try
/spark healthreport
when memory usage gets high values to see if it's the server is actually using so much memory, if it is, you'll see a lot of memory being used in healthreport. So if the server really uses so much memory you need to make a /spark heapdump
exactly when it uses a lot of memory (almost full), download Eclipse MAT
and analyze it there, it has a feature to find memory leaks btw. But it needs manual exploring the dump too.
The second case can happen if you allocate a lot of RAM to the server and forget to think about Java itself which needs RAM too. As of my experience it needs like 1GB extra RAM to work fine and not to get killed. Also when using AlwaysPreTouch
flag (Aikar's flags have it) the server allocates the whole RAM you gave it at the start making any other process unable to use it if needed, that's where Java process can get hurt. You can try disabling AlwaysPreTouch (just to test it, the purpose of the flag itself is fine) and see if it helps. If it does, it means you need to lower RAM values a bit, maybe 4.5G goes cool, so it needs testing.!oom
My server is using too much memory
My panel says my memory usage is high all the time.
Your server runs in the Java Virtual Machine (JVM), which has significant overhead & tries to effectively use ALL of the memory assigned to it.
Memory usage from "htop", Task Manager, or your server panel is the total consumption of the JVM, not just your server.
My server is lagging & I think it's memory related.
It's much more likely that you are bottlenecked by your CPU, disk, or some inefficient mod/plugin.
Rule of thumb, servers should have anywhere from 4GB to 12GB of memory, with 8GB being the 'sweet spot'.
If you're heavily modded, add 4GB to that.
Too much memory can be a bad thing. Don't exceed these caps unless you really know why you're doing it.
Troubleshoot your server the right way: use Spark & send us a report.
My server is randomly terminated unexpectedly.
Setting your server to use 8GB does not mean that Java won't exceed this amount.
As a rule of thumb, allow your system/container about 1-2GB (possibly more) overhead outside of the server.
If you're on Linux & can SSH into the system, check your kernel logs. They will report any incidents of OOM.
I want to use swap to allocate more memory.
Don't. Swap is not free memory and using it can negatively impact performance.
Admincraft Canned Responses
Okay, sweet. I will try removing the AlwaysPreTouch flag! I made a heap dump last night but I didnβt know how to read it π
Oh, and I will mark this answered once I have a chance to test this
Oh, shoot. I forgot to post my startup flags. My current setup doesnβt have the AlwaysPreTouch flag enabled.
Set both xms and xmx to 5G
My host is forcing -Xms to be 128M. I cannot increase it for some reason :\
Further troubleshooting, I grabbed a
/spark heapdump
from when my server was just about to reach OOM. I'm analyzing it now using Eclipse MAT. Anything I should check for specifically?could you just do a spark report and send it?
How do I do that?
!spark
Spark Profiler
Spark can be used to see why your server or client is lagging.
https://spark.lucko.me/
Admincraft Canned Responses
uhh
Sorry, I know that is probably a horrible question lol, I'm not too familiar with spark overall
/spark profiler start --timeout 300
Spark Profiler
Spark can be used to see why your server or client is lagging.
https://spark.lucko.me/
Admincraft Canned Responses
that will run the profiler for 5min
you could probably go a bit shorter
Alright, I'll be back in 5 mins with the report
neither π
Is it normal for 50% of your occupied RAM to be the chunk or chunk task scheduler? That's what MAT is reporting currently
honestly you probably just need more ram
That's what I'm thinking. I reached out to my host who said they would pro-rate me since I just purchased on Sunday, but haven't gotten an actual human yet (I got a bot auto-reply with the info, which was surprisingly detailed lmao)
what host are you with
Currently WitherHosting. I have used PebbleHost in the past, but my previous host for this server was Exaroton. I quickly realized it was...not great for my use case lol
WitherHosting is ehh
What does AdminCraft recommend within that same budget range?
What's your PLEB?
Plan/Players
Location
Edition
Budget
Spark Profiler report here
https://spark.lucko.me/Ft5IQvJqqR
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
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.
β Low Memory
Allocate at least 6-10GB of ram to your server if you can afford it.
β chunk-gc.period-in-ticks
Decrease this in bukkit.yml.
Recommended: 400.
β ticks-per.monster-spawns
Increase this in bukkit.yml.
Recommended: 4.
β spawn-limits.monsters
Decrease this in bukkit.yml.
Recommended: 15.
β spawn-limits.water-ambient
Decrease this in bukkit.yml.
Recommended: 5.
β spawn-limits.ambient
Decrease this in bukkit.yml.
Recommended: 1.
β spawn-limits.animals
Decrease this in bukkit.yml.
Recommended: 5.
β entity-activation-range.animals
Decrease this in spigot.yml.
Recommended: 16.
β entity-activation-range.monsters
Decrease this in spigot.yml.
Recommended: 16.
β entity-activation-range.misc
Decrease this in spigot.yml.
Recommended: 12.
β entity-activation-range.water
Decrease this in spigot.yml.
Recommended: 12.
β entity-activation-range.villagers
Decrease this in spigot.yml.
Recommended: 16.
Requested by terrorbytetw#0 β’ Page 1 of 4
yeah that cpu is horrible
witherhosting is really not the best imo
also you should be using java 17 not 18
I can switch to 17, 18 was something I did to test. As for the CPU, I'm aware it's not the best but I haven't had a single bottleneck with it yet, actually. It's all been memory related as far as I can tell
However, I can consider upgrading to a Ryzen
Would a Ryzen 5600X be better?
I'm currently using the Miami location, but the NYC location looks to be a bit better
Looks like Chicago offers the same thing
id recommend a different host
how much are you paying right now?
$18/3 months
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.
β entities.spawning.despawn-ranges.monster.hard
Decrease this in config/paper-world-defaults.yml.
Recommended: 96.
β entities.spawning.despawn-ranges.underground_water_creature.soft
Decrease this in config/paper-world-defaults.yml.
Recommended: 28.
β entities.spawning.despawn-ranges.underground_water_creature.hard
Decrease this in config/paper-world-defaults.yml.
Recommended: 96.
β entities.spawning.despawn-ranges.water_ambient.soft
Decrease this in config/paper-world-defaults.yml.
Recommended: 28.
β entities.spawning.despawn-ranges.water_creature.soft
Decrease this in config/paper-world-defaults.yml.
Recommended: 28.
β entities.spawning.despawn-ranges.water_creature.hard
Decrease this in config/paper-world-defaults.yml.
Recommended: 96.
β misc.redstone-implementation
Set this to "ALTERNATE_CURRENT" in config/paper-world-defaults.yml.
β chunks.entity-per-chunk-save-limit.experience_orb
Set a value in config/paper-world-defaults.yml. Recommended: 16.
β chunks.entity-per-chunk-save-limit.snowball
Set a value in config/paper-world-defaults.yml. Recommended: 16.
β chunks.entity-per-chunk-save-limit.ender_pearl
Set a value in config/paper-world-defaults.yml. Recommended: 16.
β chunks.entity-per-chunk-save-limit.arrow
Set a value in config/paper-world-defaults.yml. Recommended: 16.
β mobs.villager.spawn-iron-golem.radius
Increase this in purpur.yml.
Recommended: 5.
Requested by terrorbytetw#0 β’ Page 4 of 4
do mind low cpu usage doesnt mean there isnt a cpu bottleneck happening
^