Forge Server Tools · every failure mode · guides

java.lang.OutOfMemoryError Java heap space Minecraft server

Out of memory — FATAL

What this actually means

The JVM hit its heap ceiling. On a modded server this is usually a heap that's simply too small for the pack, but it can also be a memory leak or a world-gen spike from a chunk-heavy mod.

How to fix it

Raise -Xmx in your start script / user_jvm_args.txt. Rules of thumb for modded: 100 mods ~ 6G, 200+ mods ~ 8-10G. Set -Xms equal to -Xmx. Do NOT give the JVM all your RAM -- leave 2-4G for the OS. If it dies at the same point every time with plenty of heap, it is a leak or a worldgen spike, not a size problem; check what loaded just before.

How to be sure it is this

Confirm the heap the server actually got, not what you intended. The crash report's System Details lists it.

What it gets mistaken for

An OS kill is not this. If the log simply stops with no exception and no crash report, the kernel killed the process — different problem, opposite fix: lower -Xmx, not raise it.

What to do next

If more heap only delays it, you have a leak. See how much RAM for telling the two apart.

What it looks like in your log

Search your crash report or latest.log for any of these:

java.lang.OutOfMemoryError:
GC overhead limit exceeded

The free edition of Forge Server Doctor detects this one. It is a single Python file with no dependencies — point it at the report and it names the cause and the mod jar:

python3 forge_doctor.py crash-reports/crash-....txt