NEW 📢 Limited launch offer: up to 70% off your first month on every game!See plans

Java asked for more memory than your Minecraft plan has

MinecraftUpdated Oct 28, 20263 min read

Java will not start when it is told to take more memory than the server has. On a PlayNHost server the panel sets Java's memory for your plan, so this message almost always means an extra memory flag in the server's startup that asks for more. Remove that flag and start the server again.

What you see

  • The server stops within seconds of starting.
  • The Console shows Could not reserve enough space for object heap, or Invalid maximum heap size: and a value.
  • The Why your server stopped box on Overview and above the console says Java asked for more memory than this plan has. and A startup flag sets the memory above the plan's. Remove any -Xmx or -Xms you added under Settings, Startup Parameters. Its button is Open startup parameters.

Fix it

  1. Click Open startup parameters in the box, or open Settings and click Startup Parameters.
  2. Look at Custom parameters. Remove any flag that starts with -Xmx, -Xms or -XX:MaxRAM, then click Save. The panel no longer accepts these flags there, because it sets Java's memory for your plan itself.
  3. Start the server.

If Custom parameters has no such flag and the server still stops with this message, open a ticket and include the last lines of the Console.

How the panel sets the memory

You do not need a memory flag. When Custom parameters is empty, the panel says None. Your server already starts with PaperMC's recommended flags, sized to your plan. Add a flag here only to change one of them. Your plan's memory is shared between the game and what Java needs around it, and the panel works out that split for your plan.

More on flags you can add: How to add Java startup flags to your Minecraft server.

Good to know

Already hosting it somewhere else? Move your server to us

OUR LATEST BLOGS