Home » Articles » Features » Troubleshooting » 5 Ways to Fix the Minecraft Out-of-Memory Error on a Windows PC

5 Ways to Fix the Minecraft Out-of-Memory Error on a Windows PC

Here we look at how players can fix the Minecraft out-of-memory error on Windows 11/10 PCs. Does your Minecraft game throw up a “run out of memory” error message whenever you try to play it? If that is the case, check out the potential solutions for fixing that gaming issue in the guide below.

5 Ways to Fix the Minecraft Out of Memory Error on a Windows PC

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.

  1. Press Ctrl + Shift + Esc to bring up a Process tab in Task Manager.
  2. Select unneeded background processes for apps and click End task to close them.
    The Processes tab

    The Processes tab

  3. Click Startup to view a list of apps that automatically start with Windows.
    The Startup tab

    The Startup tab

  4. 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.

  1. Utilize the Windows logo + S hotkey to activate a tool for file searching.
  2. Enter advanced system settings inside the file search tool.
  3. Click View advanced system settings to bring up a properties window.
  4. Press Environment Variables to bring up a window for adding variables.
    The Environment Variables button

    The Environment Variables button

  5. Click the New button for System variables.
  6. Type _JAVA_ Options inside the Variable name box.
  7. Next, input -Xmx1024M into the Variable value box.
    The New System Variables window

    The New System Variables window

  8. Click OK to set the new variable.
  9. Select OK in the Environment Variables window.
  10. 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.

  1. Open the Minecraft Launcher window.
  2. Click the Installations tab.
  3. Press the button and select Edit.
    The Edit option

    The Edit option

  4. Click More Options to reveal JVM Arguments.
  5. 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.
    The JVM Arguments box

    The JVM Arguments box

  6. 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.

  1. Open this Uninstall Java Versions page.
  2. Click I Agree to the Terms.
    The Uninstall Java Versions page

    The Uninstall Java Versions page

  3. Open File Explorer and the folder containing the downloaded Java Uninstall Tool.
  4. Click Agree and select to uninstall Java within the tool.
    The Java Uninstall Tool

    The Java Uninstall Tool

  5. 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.

Leave a Reply