Transcript
The full narration, chapter by chapter. Click a time to play the video from there.
Intro
Need more RAM for your Minecraft server, or seeing "OutOfMemoryError: Java heap space"? Here's how to fix both.
The error
That error means the server needed more memory than its limit allowed, so Java crashed it.
Xmx and Xms
The limit is set in the start command. -Xmx is the maximum RAM, and -Xms is the starting amount. Set both the same, for example 6G. And always leave one or two gigabytes for the operating system.
On a panel
On a hosted panel, the memory comes from your plan, and the panel applies it for you. To go higher, upgrade the plan, then restart the server.
How much?
How much do you need? Two to four gigabytes for vanilla or Paper. Four to six with plugins and more players. Six to eight for medium modpacks. And eight to ten, or more, for big ones. More isn't always better.
When RAM isn't the fix
If memory keeps climbing until it crashes, no matter how much you give it, a mod or plugin is probably leaking. Lower the view distance, and pre-generate the world. And if the server lags with plenty of free RAM, the bottleneck is the CPU, not memory.
Recap
Quick recap: raise -Xmx, leave room for the system, and match the RAM to your modpack. Minecraft hosting at esagames.ro.


