How to Fix Out of Memory Errors
How to Fix Out of Memory Errors
If your server runs out of RAM, it will crash or become unresponsive. You may see the following in your console:
[Elytra Daemon]: Exit code: 137
[Elytra Daemon]: Out of memory: true
Why this happens
- Too many plugins or mods running simultaneously.
- Too many players online at the same time.
- A poorly optimized plugin or mod consuming excessive memory.
- Your server is running resource-heavy features beyond what your plan's RAM can handle.
How to fix it
Option 1 โ Optimize your server
Reducing your server's resource usage is the best first step:
- Remove any unused or unnecessary plugins and mods.
- Check for plugins or mods that are known to be memory-heavy and replace them with lighter alternatives.
- Reduce the server's view distance in
server.propertiesby lowering theview-distance=value (e.g. set it to6or lower). - Reduce the server's simulation distance in
server.propertiesby lowering thesimulation-distance=value (e.g. set it to6or lower). - Visit YouHaveTrouble's Optimization Guide for a comprehensive guide on optimizing your server's performance.
Option 2 โ Install Chunky
Chunky is a pre-generation tool that pre-generates your world chunks ahead of time, reducing the memory and CPU load caused by generating new chunks on the fly. It is available for Fabric, Forge, NeoForge, Paper, Spigot, and more.
- Download Chunky from Modrinth.
- Upload the
.jarfile to yourplugins/ormods/folder depending on your server software. - Restart your server.
- Run the following commands in your console to pre-generate your world:
chunky radius 5000
chunky start
๐ Note: Pre-generating a large radius can take a significant amount of time and temporarily increase CPU usage. Start with a smaller radius and increase as needed.
Option 3 โ Install Kryptonite (Plugin-based servers only)
Kryptonite is a server optimization plugin that automatically adjusts your server's configuration for better performance and reduced lag. It supports plugin-based servers only โ CraftBukkit, Spigot, Paper, Purpur, and Folia.
- Download Kryptonite from Modrinth.
- Upload the
.jarfile to yourplugins/folder. - Restart your server.
- Run
/kosin the console to launch the Kryptonite Optimisation System (KOS) and apply performance-friendly configuration values. - Restart your server again for the changes to take effect.
Option 4 โ Upgrade to Bao+
If you're consistently running out of memory, your plan's RAM may not be enough for your server's needs. Consider upgrading to Bao+ for more resources:
Free Plan: 20 GB disk, 6 GB RAM, 3 vCPU's
Bao+: 30 GB disk, 8 GB RAM, 4 vCPU's
You can upgrade at Membership Page
Still need help?
If you've tried the above and are still experiencing out of memory errors, feel free to make a post in our Discord community forum.