Flavour
AAdmincraft
•Created by Flavour on 7/15/2023 in #questions
Self Hosted server running out of memory and crashing
Hello, I'm here on behalf of a friend (he's asleep atm) who is hosting a server for our small group (like 2-4 max).
Spark log: https://spark.lucko.me/uwL7gPZmt6
I have a crash log as well, I assume it is safe to post in terms of PII? Don't want to post something that would negatively impact him :D
Unfortunately there were no actual crashes during the log as I was unable to capture the log link since the server wasn't responding to my open command during a later crash.
Essentially the issue is that, over time, the performance of the server degrades and memory usage climbs, eventually resulting in at least one OOM crash I've seen.
Typically when this happens the server doesn't actually terminate properly, so the restart script he has doesn't fire (any advice on a better way to handle automated onlining after crash would be appreciated).
I'm going to make a couple of assumptions, please correct me if I'm wrong on anything. I assume removing the ability for the server to access swap memory would be beneficial (it's on an HDD temporarily).
I also assume nothing specific in-world is causing significant problems. We were having some TPS issues earlier and I narrowed that down to Villager AI (their pathfinding/brain were going ham during bell gathering).
I resolved that by throwing them all into Ars Nouveau jars.
I am aware we are running a very bare server (no Spigot/Paper/etc, and we did not pregen chunks (can this be done on an established world safely? Would it help?)
Anyway, I'm mainly looking for information regarding automating a failsafe restart of the server on crash/oom, and any flags or general server config stuff that might help.
I appreciate any and all advice though. I will caveat that I have almost no experience with Linux and my friend is very new to it, and still learning. Same goes for MC Server stuff.
TIA o/
63 replies