Early accessEarly accessPackquill is in early access: it works and makes a backup before every change, but you may still run into bugs.

“java.lang.OutOfMemoryError: Java heap space”

The game used up the memory it was allowed. Give it more in the launcher, but not more than your computer can spare.

All launchersFabricForgeNeoForgeQuilt

The message

Error message
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: GC overhead limit exceeded
There is insufficient memory for the Java Runtime Environment to continue.

The full message is in the game folder: logs/latest.log for every start, and crash-reports/ for crashes that got far enough to write a report. In Prism, CurseForge and the Modrinth App, the instance's folder button opens the game folder.

What it means

Java gets a fixed amount of memory when the game starts (the -Xmx setting, “Maximum memory” in launchers). Mods, textures and loaded chunks all live there. When it is full, Java stops with “Java heap space”, or spends all its time cleaning up and stops with “GC overhead limit exceeded”.

“There is insufficient memory for the Java Runtime Environment” and “The paging file is too small” are the opposite problem: the computer itself ran out, often because the game was given more than the PC has free.

“Metaspace” means too many classes for the setting, common in very large packs; it also needs more memory.

How to fix it

  1. 1Check how much the game gets now: the crash report's “Memory:” line shows the limit in MiB.
  2. 2Raise it in your launcher. Official launcher: Installations → Edit → More options → JVM arguments, change -Xmx2G to -Xmx6G. Prism: Settings → Java → Maximum memory. CurseForge: Settings → Minecraft → Allocated memory.
  3. 3As a guide: a light pack runs in 4 GB, a typical one in 6 GB, a very large one in 8–10 GB. More than that rarely helps and slows the cleanup down.
  4. 4Leave at least 4 GB to Windows and other programs. If the message is “insufficient memory for the Java Runtime”, lower the setting instead, or close other programs.
  5. 5If memory still fills up with a generous setting, a mod is leaking memory or a high render distance or a large resource pack is loading too much. Lower the render distance and test again.

With Packquill

Packquill tells the memory errors apart (heap, cleanup limit, Metaspace, native memory, page file) and reads the limit the game had, so you know whether to raise it or lower it. The RAM setting itself stays in your launcher.

Packquill is free for Windows and Linux. It backs up every change, so anything it does can be undone.

Questions

Is more RAM always better?

No. Above what the pack needs, a bigger heap makes Java's cleanup pauses longer, which feels like stutter. Give enough, not all.

The graphics card ran out of memory. Is that the same?

No. “GL_OUT_OF_MEMORY” is video memory on the graphics card. Lower the render distance, the resolution or the resource pack size instead.

Where do I see how much the game gets?

In the crash report's “Memory:” line, and in the launcher's Java or memory settings.