Out of memory while pregenerating?
I'm currently testing pregenerating on my modded 1.18.2 Forge server, and I'm running into an issue where after about an hour or so of pregeneration, the server runs out of memory. Whenever the memory usage reaches an amount that would force the server to crash, my chunk pregenerator mod automatically saves the world, and then closes it to prevent corruption. Something is prompting this to happen and I am trying to figure out what. My assumption is a memory leak, but I have no clue what could be causing it.
Attached is my modpack- are there any mods there that may have a memory leak? And yes there are a few client-only ones there but I do not have those ones installed on the server.

69 Replies
ever considered chunky?

that mod is fine as well
How would they be pregenning without chunky?
its better to stick to well known mods if you are having an issue
chunk pregenerator is a Pregen mod as well
but that chunk pregen mod is a more Harsh on your system then chunky
Oh I'm blind
I saw the word Chunk in that image and thought it said chunky

distant horizons NEVER goes on the server
embeddium isnt a server mod
And yes there are a few client-only ones there but I do not have those ones installed on the server.
oh
uh
neat
ok
so why is he sending his client mods
Β―\_(γ)_/Β―
when the server is the issue
whats ur host, how much ram etc
crash logs too
a. distant horizons DOES go on the server, as that is a server-side fork of it (that does work)
b. as I said I do not have the client-only mods on the server itself
Witherhosting, 8gb total and 6.5 allocated
and it doesn't do crash logs bc the chunk pregenerator stops it before it actually "crashes"
why does it go on the server?
its such a odd thing to have as a server mod
because it is a server-side fork of the mod that improves its functionality on the server
distant horizons is not what I am confused about or having problems with though
okay stop using whatever chunk pregenerator and switch to chunky
no i can assume its not
maybe that mod is doing something weird
it's a good chunk pregenerator
what's happening is I am pretty sure there is a memory leak
seeing how theres an oom issue on their ghub, no.

have you Tried with chunky, or just kept using chunk pregenerator?
I have tried chunky in the past- it's slower and worse than chunk pregenerator
shouldnt be
chunk pregenerator is detecting a memory leak happening and killing the server before it can actually crash
whats the point of it Killing the server if itll still Crash??
just seems counter intuitive
it doesn't crash because it gets killed by the chunk pregenerator before it does so
it's to prevent world corruption
doesnt make much sense to me
but have you actually tried chunky for this mod pack
yes. chunky is slower and worse. which is why im not using it
ive run chunky dozens of times and let it crash
Never does world corruption when it does crash
heres a thought
use chunky
and send crash report
your pregen mod kills the server before a crash, so there is actually less info to analyze whats going on
my question wasn't about chunk pregenerator recommendations it was about if any of those mods are known to cause OOM issues
im thinking if any of those have known issues on my version or something I can eliminate that possibility
maybe

every single mod on planet earth will have one or two OOM issues from five years ago
we cant help without a decent amount of prior info
like spark reports / some crash logs or etc
^^
I can get spark reports
also logs too
preferably a crash report but guess we dont get that
I need to give it a bit for the memory to start reaching near the limit of what is allocated, but here's a spark profile for just right after starting: https://spark.lucko.me/NHC8P8CaCL
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
π Spark profile attached:
it usually takes it about an hour or so to "crash", so I'll take another profile later closer to then
why 6.5gb allocated vs 8gb?
do you run a vps or something?
because you're supposed to leave like 1-2gb free?
typically the host provides the overhead
at least they Should
I don't think I've ever heard of that being a thing before
or at least you're supposed to still provide a bit yourself regardless
:pepe_shrug: ive always allocated the amount ive been given unless i locally host
I have always been told not to do that
yeah, indeed providers should be responsible for overhead
here's another profile: https://spark.lucko.me/Vw7U6fGzSF
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
π Spark profile attached:
@MrRazamataz do you allocate overheads?
@ππππΎππΎπΈ | Ping for reply some more spark reports:
1 - https://spark.lucko.me/00d8iElZDB
2 - https://spark.lucko.me/qqa1NcyWfP
3- https://spark.lucko.me/GnHR5SaEU0
π Spark profile attached:
π Spark profile attached:
π Spark profile attached:
We can apply SWAP space if needed.
Thatβs horrible
By overhead I presume you mean for the JVM?
We'd usually make sure the startup commands are set correctly before going further.
What is SWAP space?
also @ππππΎππΎπΈ | Ping for reply here's the latest.log
π Attachment uploaded to: https://mclo.gs/ZTC4cZS
storage thatβs used as ram
alright
I found a way to disable chunk pregenerator's auto shutdown when ram usage gets too high, so I'm just going to let it go and see if it properly crashes and then send the crash report if it does
@ππππΎππΎπΈ | Ping for reply @Tamz crash report
still seems like the "slower and worse" option would have saved you a lot of time here