Skip to content
Tickwise
CriticalMemorySIG-MEM-001

Out of heap memory (OutOfMemoryError: Java heap space)

Platforms
Paper · Purpur · single server
Verified
Verified
Confidence
Confidence 95%

What it looks like in the log

Any one of these lines is enough. The agent matches them locally, on your server.

logs/latest.log
  • [WARN] java.lang.OutOfMemoryError:

Symptoms

  • The server lags heavily, then crashes or stops responding
  • In the log: “java.lang.OutOfMemoryError: Java heap space” (or “GC overhead limit exceeded”)

Cause

The JVM could not allocate an object on the heap: the configured -Xmx is too small for the current load, or memory is being held by a leak (a plugin, a huge number of entities/chunks).

Possible causes

  • -Xmx is too small for the number of players, plugins and loaded chunks
  • A memory leak in a plugin (memory grows from restart to restart until OOM)
  • A one-off overload: pre-generation/WorldEdit over a large area, thousands of entities in one place

How to fixMedium risk

  1. Restart the server: after an OutOfMemoryError the JVM state is unreliable and data may not be saved.
  2. Check -Xmx in the launch command: it must leave headroom below the container/VDS limit (1–1.5 GB for off-heap); if there is headroom, increase -Xmx (and set -Xms to the same value).
  3. If OOM recurs with enough heap, look for a leak: /spark heapsummary shortly before the crash or a heap dump (-XX:+HeapDumpOnOutOfMemoryError); compare with recently installed/updated plugins.
  4. Check whether a heavy operation (pre-generation, WorldEdit) was running at the time of the crash, and limit it.

Translated from the Russian original; log lines are quoted verbatim.

Sources