Minecraft Game Out of Memory Error: How to Fix It

Easy 5-10 minutes High Severity Verified June 2026
Error Code
Out of Memory
Brand
Minecraft
Product Type
game
Severity
High
DIY Difficulty
Easy
Estimated Fix Time
5-10 minutes
The Minecraft Out of Memory error (java.lang.OutOfMemoryError) occurs when the game runs out of allocated RAM and crashes. This happens because Minecraft uses Java, which has a default memory limit that's often too small for modern gameplay with mods, large worlds, or high render distances.
Ad

Tools You'll Need

How to Fix Error Code Out of Memory

  1. Close Minecraft and launcher completely

    Save your world progress before closing to prevent data loss
  2. Open Minecraft Launcher and go to Installations

  3. Edit your Minecraft installation

  4. Enable advanced settings

  5. Modify JVM Arguments to allocate more RAM

    Never allocate more than half your total system RAM to avoid system instability
  6. Save changes and launch

  7. Test the game stability

Parts You May Need

Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Additional RAM modules
Check Price on Amazon
Ad

When to Call a Professional

Contact a computer technician if you're unsure about your system's RAM capacity, experiencing persistent crashes after increasing memory allocation, or if you need help upgrading your computer's physical RAM.

Frequently Asked Questions

How much RAM should I allocate to Minecraft?
For vanilla Minecraft, 2-4GB is usually sufficient. For modded Minecraft, allocate 4-8GB depending on the number of mods. Never exceed 50-60% of your total system RAM.
Why does Minecraft keep running out of memory even after increasing RAM?
This can happen due to memory leaks from mods, too many resource packs, or extremely large world files. Try reducing render distance, removing unnecessary mods, or using optimization mods like OptiFine.
Can I fix this error on Minecraft Bedrock Edition?
Minecraft Bedrock Edition manages memory automatically and doesn't allow manual allocation. If you're getting memory errors on Bedrock, try closing other apps, restarting your device, or reducing graphics settings.
What if I don't have enough RAM on my computer?
If your computer has less than 8GB of total RAM, consider upgrading your physical RAM or reducing Minecraft's graphics settings, render distance, and removing resource packs or mods.