Out of memory!
Mojang Minecraft
Severity: MinorWhat it means
The screen says that Minecraft has run out of memory, either because of a bug in the game or because the Java Virtual Machine didn't get enough memory.
The game quits the world to prevent damage to it, and asks you to restart the game if you see the message again.
Affected Models
- Minecraft: Java Edition
How to Fix It
-
Restart the game.
Back up your worlds before you change settings. -
See how much RAM the computer has.
Windows: Settings > System > About.
Mac: the Apple menu > About This Mac. -
In the launcher, open Java Edition > Installations, choose your installation and More Options.
Copy the text in JVM arguments to a text file first, so that you can put it back.
-
Change the number after -Xmx and save. -Xmx4G gives the game 4 GB.
Mojang's recommended maximum is half of your RAM on a 64-bit system.
With 4 GB of RAM or less, stay at 2 GB. -
Close other programs while you play.
Frequently Asked Questions
Why did it start after an update?
After snapshot 26.1-snapshot-2 the default went from 2 GB to 4 GB.
On a PC with less than 4 GB of RAM, set it back to 2 GB by hand.