Many players have encountered the out-of-memory error that frequently crashes Minecraft. That error has a message that says, “Minecraft has run out of memory.” A player’s Reddit post said this about that error, “I can’t play for more than 60 seconds before getting a “Minecraft has run out of memory” error message.” Thus, this error frequently crashes Minecraft, making the game unplayable for some players. This is how you can fix the Minecraft out-of-memory error on Windows 11/10 PCs.
Close Background Apps Before Playing Minecraft
The Minecraft out-of-memory error is, as its message suggests, primarily an insufficient RAM (system memory) issue. Closing background apps before playing Minecraft will free up system memory for the game. Try closing background apps before starting Minecraft like this.
- Press Ctrl + Shift + Esc to bring up a Process tab in Task Manager.
- Select unneeded background processes for apps and click End task to close them.
- Click Startup to view a list of apps that automatically start with Windows.
- Select unneeded apps on the Startup tab and click Disable.
Set a New System Variable
Players confirm you can fix the Minecraft out-of-memory error by setting a new system variable. This is how you fix that error by setting a new system variable.
- Utilize the Windows logo + S hotkey to activate a tool for file searching.
- Enter advanced system settings inside the file search tool.
- Click View advanced system settings to bring up a properties window.
- Press Environment Variables to bring up a window for adding variables.
- Click the New button for System variables.
- Type _JAVA_ Options inside the Variable name box.
- Next, input -Xmx1024M into the Variable value box.
- Click OK to set the new variable.
- Select OK in the Environment Variables window.
- Click Start > Power > Restart to reboot.
Allocate More RAM via Minecraft Launcher
Another confirmed way to fix the Minecraft out-of-memory error is to allocate more RAM via the game’s launcher. The launcher includes a JVM arguments box installation setting you can modify to increase memory allocation. This is how you can allocate more RAM with that setting.
- Open the Minecraft Launcher window.
- Click the Installations tab.
- Press the … button and select Edit.
- Click More Options to reveal JVM Arguments.
- Change the -Xmx2G part of the JVM argument to a higher amount of RAM within your PC’s system specifications. For example, set -Xmx2G to -Xmx4G if set at two gigabytes.
- Click Save to set your new settings.
Lower Graphical Settings in Minecraft
Lowering the graphical settings for Minecraft will reduce the game’s RAM utilization. To do that, click Options > Video settings in the Minecraft game. Try disabling V-Sync, reducing the resolution, and setting a lower render distance from Minecraft’s graphics settings.
Reinstall Java
The Minecraft out-of-memory error can sometimes arise because of outdated or corrupted Java on users’ PCs. Reinstalling Java will likely fix such issues. You can reinstall Java like this.
- Open this Uninstall Java Versions page.
- Click I Agree to the Terms.
- Open File Explorer and the folder containing the downloaded Java Uninstall Tool.
- Click Agree and select to uninstall Java within the tool.
- Download and install the latest Java version as covered on this Java help page.
The resolutions covered in this guide are among the most widely confirmed troubleshooting methods to fix the Minecraft out-of-memory error. However, there could be more potential solutions for resolving that issue. Players who’ve found other ways to resolve this Minecraft gaming issue are most welcome to share their fixes in the comments section below.