Minecraft Error Code OutOfMemoryError: How to Fix It

Easy 10-20 minutes Medium Severity Verified June 2026
Error Code
OutOfMemoryError
Brand
Minecraft
Product Type
game
Severity
Medium
DIY Difficulty
Easy
Estimated Fix Time
10-20 minutes
The Minecraft OutOfMemoryError means the game has run out of allocated Java heap memory — essentially, Minecraft has used up all the RAM it was given and crashed. This commonly happens when running heavily modded instances, large resource packs, or when the default memory allocation is too low for your world or setup. Fortunately, this is almost always fixable by increasing the amount of RAM assigned to Minecraft through your launcher settings.
Ad

Tools You'll Need

How to Fix Error Code OutOfMemoryError

  1. Check How Much RAM Your System Has

    Allocating too much RAM to Minecraft can make your entire system sluggish or unstable. Always leave at least 2–3 GB free for your operating system.
  2. Increase RAM in the Official Minecraft Launcher

  3. Increase RAM in a Third-Party Launcher (CurseForge, ATLauncher, MultiMC, Prism Launcher)

  4. Update Java to a 64-bit Version

    Do not download Java from unofficial or unknown websites. Stick to adoptium.net (Eclipse Temurin) or the official java.com.
  5. Reduce Memory Load In-Game

  6. Install Performance Mods (Java Edition)

  7. Clear Outdated Shader Caches and Log Files

  8. Check for Memory Leaks in Mods

Ad

When to Call a Professional

The OutOfMemoryError in Minecraft is almost always self-fixable. However, if you have already allocated maximum reasonable RAM, updated Java, removed all mods, and crashes still occur, your physical RAM sticks may be faulty. Run the Windows Memory Diagnostic tool or MemTest86 to test your RAM hardware. If hardware failure is confirmed, contact a computer repair technician to replace the RAM. If you are running a Minecraft server for others and the server process is crashing, consider reaching out to your server hosting provider's support team for help tuning JVM flags.

Frequently Asked Questions

How much RAM should I allocate to Minecraft?
For vanilla Minecraft, 2–3 GB is usually sufficient. For small modpacks, 4 GB works well. For large or heavy modpacks (like ATM or All the Mods), 6–8 GB is recommended. Never allocate more than 75% of your total system RAM, and always leave at least 2–3 GB free for your operating system and other programs.
Why does Minecraft keep running out of memory even after I increased RAM?
This usually happens for one of three reasons: you are running 32-bit Java (which is capped at ~1 GB regardless of settings), a mod has a memory leak that gradually consumes all available heap space, or your modpack genuinely requires more RAM than you have allocated. Check your Java version first, then review crash reports for specific mods causing issues.
Where is the Minecraft crash report located?
Crash reports are saved in the 'crash-reports' folder inside your Minecraft directory. On Windows, this is typically at C:\Users\YourName\AppData\Roaming\.minecraft\crash-reports. On macOS, it is at ~/Library/Application Support/minecraft/crash-reports. Open the most recent .txt file with any text editor to read the details.
Does allocating more RAM to Minecraft always improve performance?
Not always. Allocating excessive RAM (for example, 16 GB when your modpack only needs 6 GB) can actually cause longer garbage collection pauses, making the game stutter. Allocate only what you need — start at 4 GB for modded play, then increase in 1–2 GB increments only if crashes or slowdowns continue.
Can OutOfMemoryError happen on Minecraft Bedrock Edition?
No. OutOfMemoryError is a Java-specific error that only occurs in Minecraft Java Edition. Bedrock Edition is written in C++ and manages memory differently, so you will not see this exact error there. Bedrock Edition may still crash due to memory pressure on low-end devices, but the fix involves closing background apps and reducing in-game graphics settings rather than adjusting JVM heap settings.