Skip to content
Back to Homepage

Out of Memory Error Minecraft Java

Usually, out of memory errors (and other errors that are similar) are due to your server running out of memory. The cause can be a bit more difficult to determine.

How Does My Server Use Memory and Why Is It Running Out?

Section titled “How Does My Server Use Memory and Why Is It Running Out?”

Every Minecraft package we sell has a set amount of memory (RAM). The use of plugins will use up this RAM in addition to each user in your server taking up a chunk of that RAM themselves. Thus, if you have many plugins or mods, you may find that the server lags more or crashes if there are a lot of players online at the same time. You will need to either lower the max player slots on your server, upgrade the RAM of your server, or decrease the amount of plugins or mods on your server.

Using multi-world plugins is notorious for causing out of memory crashes because each world you add uses up quite a lot of memory even if no players are on that world.

What an Out of Memory Crash Looks Like in the Console:

Section titled “What an Out of Memory Crash Looks Like in the Console:”

When your server runs out of memory, the console usually shows lag warnings first, then the error, then the crash. This is an example, so your times, numbers and names will be different:

[14:31:58 INFO]: Done (41.238s)! For help, type "help"
[14:52:10 WARN]: Can't keep up! Is the server overloaded? Running 5312ms or 106 ticks behind
[14:52:55 ERROR]: Exception in thread "Server thread"
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOf(Arrays.java:3512)
at net.minecraft.world.level.chunk.LevelChunk.<init>(LevelChunk.java:112)
at net.minecraft.server.level.ChunkMap.lambda$scheduleChunkLoad$14(ChunkMap.java:684)
[14:52:56 ERROR]: This crash report has been saved to: ./crash-reports/crash-2026-09-24_14.52.56-server.txt
[Pterodactyl Daemon]: Server marked as offline...
[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 137
[Pterodactyl Daemon]: Out of memory: true
[Pterodactyl Daemon]: Aborting automatic restart, last crash occurred less than 60 seconds ago.
Log line What it means
Can't keep up! Is the server overloaded? The server is struggling. This is often the first warning that memory is almost full.
java.lang.OutOfMemoryError: Java heap space Java ran out of the memory it was allowed to use. The lines below it show what the server was doing at that moment, such as loading chunks.
Exit code: 137 The process was killed because it went over its memory limit.
Out of memory: true Pterodactyl confirms the crash was caused by memory.
Aborting automatic restart The panel stopped restarting the server because it crashed twice within 60 seconds.

Other common versions of this error:

java.lang.OutOfMemoryError: GC overhead limit exceeded
java.lang.OutOfMemoryError: Metaspace
java.lang.OutOfMemoryError: unable to create new native thread

They all mean the same thing: your server needs more memory, or something on it is using too much.

Out of memory errors can be caused by out of date plugins, or plugins that are incompatible with the version of CraftBukkit your server uses. It is always best to make sure everything on your server is up to date to reduce the chances of this happening.

Your server can also run out of memory because of things in your world such as mobs, lava, water, redstone, pistons, entities, etc. These can cause memory leaks and may have to be manually removed.

  1. Open the newest file in the /crash-reports/ folder and read the top section. It often names the plugin or mod that caused the problem.
  2. Update or remove the plugin or mod named there.
  3. Lower view-distance and simulation-distance in server.properties.
  4. If nothing helps, upgrade the RAM of your server.

It is worth noting that a 100% stable server is nearly impossible to have, due to the nature of Minecraft/CraftBukkit servers and plugins.