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:
Paper Plugins: (2):
[23:30:57 INFO]: - eco, EconomyShopGUI
[23:30:57 INFO]: Bukkit Plugins: (45):
[23:30:57 INFO]: - BetterRTP, Chunky, ChunkyBorder, Citizens, CMILib, *CommandSpy, CoreProtect, Crystal-Extra-Flags, DecentHolograms, DimensionPause
[23:30:57 INFO]: DiscordSRV, DiscordSRV-Staff-Chat, EcoCrates, Essentials, EssentialsChat, EssentialsSpawn, ExtraContexts, FastAsyncWorldEdit, floodgate, Geyser-Spigot
[23:30:57 INFO]: GriefPrevention, InventoryRollbackPlus, ItemEditor, Jobs, LuckPerms, Maintenance, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NBTAPI
[23:30:57 INFO]: PlaceholderAPI, PlayerWarps, PlugManX, ProtocolLib, QuickShop, sleep-most, spark, TAB, UltimateAutoRestart, Vault
[23:30:57 INFO]: ViaVersion, Votifier, VotingPlugin, WorldGuard, WorldGuardExtraFlags
Paper Plugins: (2):
[23:30:57 INFO]: - eco, EconomyShopGUI
[23:30:57 INFO]: Bukkit Plugins: (45):
[23:30:57 INFO]: - BetterRTP, Chunky, ChunkyBorder, Citizens, CMILib, *CommandSpy, CoreProtect, Crystal-Extra-Flags, DecentHolograms, DimensionPause
[23:30:57 INFO]: DiscordSRV, DiscordSRV-Staff-Chat, EcoCrates, Essentials, EssentialsChat, EssentialsSpawn, ExtraContexts, FastAsyncWorldEdit, floodgate, Geyser-Spigot
[23:30:57 INFO]: GriefPrevention, InventoryRollbackPlus, ItemEditor, Jobs, LuckPerms, Maintenance, Multiverse-Core, Multiverse-Inventories, Multiverse-Portals, NBTAPI
[23:30:57 INFO]: PlaceholderAPI, PlayerWarps, PlugManX, ProtocolLib, QuickShop, sleep-most, spark, TAB, UltimateAutoRestart, Vault
[23:30:57 INFO]: ViaVersion, Votifier, VotingPlugin, WorldGuard, WorldGuardExtraFlags
Output of /version:
[23:34:09 INFO]: Checking version, please wait...
[23:34:09 INFO]: Current: git-Purpur-2016 (MC: 1.20.1)*
* You are running the latest version
[23:34:09 INFO]: Checking version, please wait...
[23:34:09 INFO]: Current: git-Purpur-2016 (MC: 1.20.1)*
* You are running the latest version
And a snippet of the logs that keep being spit out has been attached as well.
40 Replies
Admincraft Meta
Admincraft Metaβ€’2y ago
Please use a paste service instead!
Paste services are more mobile friendly and easier to read than just posting a log file
Requested by terrorbytetw#0
Admincraft Meta
Admincraft Metaβ€’2y 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 terrorbytetw#0
TerrorByte
TerrorByteOPβ€’2y ago
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
shoker ツ
shoker ツ‒2y ago
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.
snowznz.bak
snowznz.bakβ€’2y ago
!oom
Carl-bot
Carl-botβ€’2y ago
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
TerrorByte
TerrorByteOPβ€’2y ago
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.
java -Xms128M -Xmx5120M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -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 -jar server.jar
java -Xms128M -Xmx5120M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -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 -jar server.jar
snowznz.bak
snowznz.bakβ€’2y ago
Set both xms and xmx to 5G
TerrorByte
TerrorByteOPβ€’2y ago
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?
snowznz.bak
snowznz.bakβ€’2y ago
could you just do a spark report and send it?
TerrorByte
TerrorByteOPβ€’2y ago
How do I do that?
snowznz.bak
snowznz.bakβ€’2y ago
!spark
Carl-bot
Carl-botβ€’2y ago
Spark Profiler
Spark can be used to see why your server or client is lagging. https://spark.lucko.me/
From An unknown user
Admincraft Canned Responses
snowznz.bak
snowznz.bakβ€’2y ago
uhh
TerrorByte
TerrorByteOPβ€’2y ago
Sorry, I know that is probably a horrible question lol, I'm not too familiar with spark overall
snowznz.bak
snowznz.bakβ€’2y ago
/spark profiler start --timeout 300
Carl-bot
Carl-botβ€’2y ago
Spark Profiler
Spark can be used to see why your server or client is lagging. https://spark.lucko.me/
From An unknown user
Admincraft Canned Responses
snowznz.bak
snowznz.bakβ€’2y ago
that will run the profiler for 5min you could probably go a bit shorter
TerrorByte
TerrorByteOPβ€’2y ago
Alright, I'll be back in 5 mins with the report
snowznz.bak
snowznz.bakβ€’2y ago
neither πŸ˜‚
TerrorByte
TerrorByteOPβ€’2y ago
Is it normal for 50% of your occupied RAM to be the chunk or chunk task scheduler? That's what MAT is reporting currently
snowznz.bak
snowznz.bakβ€’2y ago
honestly you probably just need more ram
TerrorByte
TerrorByteOPβ€’2y ago
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)
snowznz.bak
snowznz.bakβ€’2y ago
what host are you with
TerrorByte
TerrorByteOPβ€’2y ago
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
snowznz.bak
snowznz.bakβ€’2y ago
WitherHosting is ehh
TerrorByte
TerrorByteOPβ€’2y ago
What does AdminCraft recommend within that same budget range?
Carl-bot
Carl-botβ€’2y ago
What's your PLEB? Plan/Players Location Edition Budget
TerrorByte
TerrorByteOPβ€’2y ago
Spark Profiler report here https://spark.lucko.me/Ft5IQvJqqR
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Metaβ€’2y 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.
❌ 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
snowznz.bak
snowznz.bakβ€’2y ago
yeah that cpu is horrible witherhosting is really not the best imo also you should be using java 17 not 18
TerrorByte
TerrorByteOPβ€’2y ago
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?
TerrorByte
TerrorByteOPβ€’2y ago
I'm currently using the Miami location, but the NYC location looks to be a bit better
No description
TerrorByte
TerrorByteOPβ€’2y ago
Looks like Chicago offers the same thing
snowznz.bak
snowznz.bakβ€’2y ago
id recommend a different host how much are you paying right now?
TerrorByte
TerrorByteOPβ€’2y ago
$18/3 months
Admincraft Meta
Admincraft Metaβ€’2y 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.
❌ 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
ProGamingDk
ProGamingDkβ€’2y ago
do mind low cpu usage doesnt mean there isnt a cpu bottleneck happening
snowznz.bak
snowznz.bakβ€’2y ago
^

Did you find this page helpful?