Minecraft Has Run Out of Memory? Here’s the Fix.

You can’t play Minecraft due to the “Out of memory” error. That can be frustrating. Fortunately, there are possible solutions to fix this error. Read on then you’ll learn the solutions.

Try below methods and see if you find one that works for you:

Method 1: Reboot your computer
Method 2: Update Java
Method 3: Lower Render Distance in Minecraft
Method 4: Allocate more RAM to Minecraft
Method 5: Limit the RAM usage of Minecraft
Method 6: Remove mods
Method 7: Use OptiFine

Method 1: Reboot your computer

The first workaround you can try is to restart your computer. Before restarting, turn off all programs running in the background and disable programs running at the startup.

1) On your keyboard, press Ctrl+Shift+Esc to open the Task Manager.

2) Go to the Processes tab and turn off the programs running in the background.

turn off programs running in background

3) Go to the Startup tab and disable the programs running at the startup.

turn off programs running at the startup

Once done, reboot your computer and check to see if the problem still remains.

Method 2: Update Java

Sometimes the “Minecraft has run out of memory” problem is related to Java. Ensure you have the latest version of Java installed on your computer.

You can download the latest version of Java from Java’s official website.

Method 3: Lower Render Distance in Minecraft

Lowering Render Distance in Minecraft video settings may help fix memory issues and FPS issues. You should always keep your render distance below 10 chunks.

To change the Render Distance, launch Minecraft, go to Settings -> Video Settings and set the value of Render Distance below 10 chunks.

Note: This method requires you to access Minecraft for a while. You can do this before the error occurs. If you can’t access Minecraft at all, this method doesn’t work for you. Then skip and try other methods.

Method 4: Allocate more RAM to Minecraft

When you receive the “Minecraft has run out of memory” error message, it probably means that Minecraft doesn’t have enough memory to run. Allocating more RAM to Minecraft may help fix the problem.

In general, for Minecraft without mods, 3GB RAM is enough. For Minecraft with mods, at least 4GB RAM is required.

The RAM that you can allocate to Minecraft should depend on how much RAM you have. Before heading to the guide on how to allocate more RAM to Minecraft, you may want to know how much RAM is installed on your PC. Follow these steps to check that:

a) Press Win+X to bring up the context menu above the Start menu and then select Settings.

b) Click on System.

c) Click About on the left panel, and then you can see the Installed RAM on the right panel. In the screenshot below, the Installed RAM is 16.0GB. It means this PC has 16.0GB RAM available.

how to check how much ram you have

Here’s how to allocate more RAM to Minecraft:

1) Open Minecraft launcher.

2) Once the Minecraft launcher opens, go to the “Installations” tab.

3) Find and select the version that you’re currently using. If you’re using the latest version, select the Latest release option.

4) Click on the three horizontal dots next to the Play button, and then select Edit from the drop-down menu.

5) In the next window, click on More Options.

6) In the “JVM Arguments” text box, look for the code that says “-Xmx[number]G”. This is the amount of memory allocated to Minecraft. If the number is 2, it means you have 2GB of memory allocated to Minecraft.

The argument "Xmx" is used to specify the maximum memory usage by Minecraft on your system.

7) Change the number in “-Xmx[number]G” to the memory you’d like to allocate and click the Save button.

For example, if you’d like to allocate 8GB to Minecraft, change the number to 8. After that, the full argument should be “-Xmx8G”.

After you allocate more memory to Minecraft, launch Minecraft and check to see if the memory issue is fixed.

Method 5: Limit the RAM usage of Minecraft

You should avoid allocate too much RAM to Minecraft. Too much RAM may also cause the “out of memory” issue. If you have enough RAM allocated to Minecraft and the problem still occurs, you can try to limit the RAM usage of Minecraft and see if it works. To do so:

1) Open Minecraft launcher.

2) Once the Minecraft launcher opens, go to the “Installations” tab.

3) Find and select the version that you’re currently using. If you’re using the latest version, select the Latest release option.

4) Click on the three horizontal dots next to the Play button, and then select Edit from the drop-down menu.

5) In the next window, click on More Options.

6) In the “JVM Arguments” text box, remove the current arguments and then copy and paste the following arguments into the box:

-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M

7) Click the Save button to save the changes.

Check to see if the problem still remains. If this method doesn’t work, head to the next method.

Method 6: Remove mods

Some mods can use too much memory (especially mods with large animated multiblock structures ) and cause Minecraft to run out of memory. If you have installed mods, you can try to remove those mods and see if it helps fix the problem.

If you can identify the mods that are using too much memory, just remove them. If not, you can remove all mods.

Here’s how to remove the mods you installed:

1) Press Win+R to open the Run box.

2) Type “%appdata%” in the Run box and press Enter. This will open the Roaming folder.

3) In the Roaming folder, locate and open the .minecraft folder.

4) Open the Mods folder and delete the mods that you wish to delete.

Method 7: Use OptiFine

To fix the problem, you can try to install Optifine. Optifine will allow Minecraft to make use of more CPU cores and make better use of allocated RAM.

Firstly, you need to download OptiFine on your computer. Follow these steps:

1) Go to the OptiFine download page.

2) Once you’re on the download page, you’ll see a list of OptiFine versions corresponding with each Minecraft version. Find the version depending on the Minecraft version you’re currently playing, and then click on Mirror.

how to download optifine

3) Click on Download to download the OptiFine installer to your computer.

Secondly, install OptiFine in Minecraft.

After you download OptiFine, follow the steps below to install OptiFine in Minecraft.

1) Right-click on the installer file and select Open with, and then select Java(TM) Platform SE binary. After that, a little program will open up.

how to install optifine

2) Click on Install then OptiFine will be installed automatically.

Hopefully you find this post helpful. If you have any questions, feel free to drop a comment below. I’ll get back to you ASAP.

Leave a Comment