[0.4.22] Server hangs due to Out-of-Memory, potential memory leak
matpratta opened this issue · 5 comments
So me and a few friends rented a server a while ago for a modded experience, at first with a custom 1.16.5 (where things were going just fine) and then switched to ATM7, on 1.18.2.
Initially things seemed okay and the server was holding up just fine (we had 6GB of RAM allocated), then we got a sudden crash where the server would hang, the RAM was maxed out and CPU usage was down to 0.5% or so. Okay, we talked with the provider and they upgraded us, initially to 8GB then 10GB, and while that did help a bit, the problem persisted, with the server eventually hitting the full 10GB again. This is aggravated by constantly travelling across the map.
The closest hint of the issue I found here is #543, which seems to be closed, so it led to a dead end.
I've tried removing Journey Map or using optimization mods but none seem to help. Also tried creating a heap dump of the server via Spark, and it generated a file with around 3~4GB, so I'm not sure it did dump everything. Enabling GC monitoring on Spark suggested it kept trying to clear a few GBs worth of stuff but for some reason failed to:
[21:50:57] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 2095ms or 41 ticks behind
[21:51:08] [spark-worker-pool-1-thread-4/INFO] [minecraft/DedicatedServer]: [⚡] Young Gen GC lasting 127 ms. (cause = G1 Evacuation Pause)
5.0 MB moved to G1 Old Gen
2.6 GB → 2.6 GB
108.0 MB moved to G1 Survivor Space
56.0 MB → 164.0 MB
3.7 GB freed from G1 Eden Space
3.7 GB → 0 bytes (100%)
[21:51:21] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 2002ms or 40 ticks behind
[21:51:32] [spark-worker-pool-1-thread-2/INFO] [minecraft/DedicatedServer]: [⚡] Young Gen GC lasting 110 ms. (cause = G1 Evacuation Pause)
1.8 MB moved to G1 Old Gen
2.6 GB → 2.6 GB
12.0 MB moved to G1 Survivor Space
164.0 MB → 176.0 MB
3.5 GB freed from G1 Eden Space
3.5 GB → 0 bytes (100%)
[21:51:46] [Server thread/INFO] [ne.bl.mo.ne.NetherPortalFix/]: Not storing return portal because it's from ResourceKey[minecraft:dimension / allthemodium:mining] to ResourceKey[minecraft:dimension / minecraft:overworld]
[21:51:50] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Is the server overloaded? Running 2008ms or 40 ticks behind
[21:51:53] [spark-worker-pool-1-thread-1/INFO] [minecraft/DedicatedServer]: [⚡] Young Gen GC lasting 148 ms. (cause = G1 Evacuation Pause)
902.5 KB moved to G1 Old Gen
2.6 GB → 2.6 GB
60.0 MB moved to G1 Survivor Space
176.0 MB → 236.0 MB
3.5 GB freed from G1 Eden Space
3.5 GB → 0 bytes (100%)
Server logs aren't providing anything useful, the server just stops and dies before writing any errors to the console or the logs.
Any ideas on what we could try disabling or at least debugging this issue?
Updating here, I observed this problem happened when entering any of the Blue Skies mod dimensions. From 3 attempts I did, one caused the server to go unresponsive, with 0% CPU usage and full memory (screenshot), while the second attempt just caused the server to go completely unresponsive, console stopped working, players got timeout, etc.
On the third attempt I entered single-player and made a portal, entered it and sure enough, my game simply hang up eating a full 10GB of RAM and 0% CPU usage.
Here's the screenshot of my server panel, notice how the RAM usage suddenly skyrocketed and CPU dropped to 0%:
Hello @MatheusMK3 any update to this?? I have a server with 8GB of ram and it rans out of ram pretty quick
Hi @JuanDavidSolano! Not really, were still having the same memory problems, with the baseline RAM usage after server starts being around 7.5-8GB. We have a 10GB server and it holds okay for a while, but eventually reaches full memory and crashes.
Another thing I noticed that crashed the server is going into the Blue Skies dimension, though I'm not sure if that's related or a whole different problem.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.