Roastd / Minecraft

critical

Not enough RAM to start

What it looks like in your log

Error occurred during initialization of VM: Could not reserve enough space for object heap

What causes it

You asked for more RAM than this computer can give to the server.

How to fix it

Lower the RAM setting, close other programs, or make sure you are using 64-bit Java.

Why it happens

Java asked the operating system for the heap -Xmx describes and was refused. Either the machine does not have that much free, the container limit is lower than -Xmx, or a 32-bit Java is being asked for more than about 1.5 GB, which it cannot address at all.

The server never starts, so there is no crash report. The only line is this one.

Fix it step by step

  1. 1Check the Javajava -version should say 64-Bit. A 32-bit Java on a 64-bit machine is the classic cause on home servers; install the 64-bit build from adoptium.net and delete the old one.
  2. 2Compare -Xmx with what is freeOn your own PC, close what else is running and look at free memory before starting the server. On a hosted plan, -Xmx has to fit inside the plan with headroom; about four fifths is right.
  3. 3Check for a doubled flagSome panels add their own -Xmx from the RAM setting, and a start script that adds another one will pass both to Java. The last one wins, and it is sometimes the wrong one.
  4. 4Start again with a smaller heapHalve -Xmx and try. If it starts, work back up until it fails to find the real ceiling, then set it just under.

If that didn't work

If the heap fits and the error still appears with "Invalid maximum heap size", the value is malformed: -Xmx4g and -Xmx4096m are valid, -Xmx4gb and -Xmx4 are not.

Not sure this is your problem? Paste your log and Roastd will tell you which of these it actually matched, and what else it found.

Check your own log
Read more: Could not reserve enough space for object heap →

Errors that travel with this one