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, orInvalid 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.andA 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
- Click Open startup parameters in the box, or open Settings and click Startup Parameters.
- Look at Custom parameters. Remove any flag that starts with
-Xmx,-Xmsor-XX:MaxRAM, then click Save. The panel no longer accepts these flags there, because it sets Java's memory for your plan itself. - 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
- After a plan change, the new memory applies the next time the server starts.
- If the server starts but later stops with
OutOfMemoryError, that is a different problem: Your Minecraft server ran out of memory. - Other causes the panel names: How to see why your Minecraft server stopped.



