What is this error?
The java.lang.OutOfMemoryError: Java heap space occurs when your Minecraft server has exhausted the memory (RAM) allocated to the Java Virtual Machine (JVM). When the server attempts to allocate more memory than it has been assigned, the process crashes to prevent system instability.
Common causes
- High player count: Too many players for the current RAM allocation.
- Resource-heavy mods/plugins: Complex mods or poorly optimised plugins consuming excessive memory.
- Large render distances: High view distances significantly increase memory usage.
- World generation: Rapidly exploring new chunks can spike memory usage.
How to fix it
On AwakeNode
- Upgrade your plan: If your server is consistently hitting its limit, choose Upgrade on your server's page. On AwakeNode, your
Xmx(maximum memory) settings are updated automatically to match your new plan, requiring no manual configuration. - Contact Support: If you believe your server should have enough RAM but is still crashing, open a ticket with our support team. To add your own JVM flags, set a custom startup command in your server's Startup tab.
On other hosts / manually
- Edit startup flags: Locate your server's startup script or command line settings. You must manually modify the
-Xmxparameter. For example, to set the limit to 4GB, ensure your command includes-Xmx4G. - Optimise your environment: Remove unnecessary plugins or mods that may be causing memory leaks. Reduce the
view-distanceandsimulation-distancein yourserver.propertiesfile to lower the memory footprint. - Check for memory leaks: If the error occurs over time rather than instantly, a specific plugin may be failing to release memory. Use a profiler tool to identify which process is consuming the most heap space.