Could not reserve enough space for object heap: the fix

The JVM asked for more memory than the plan can give it, almost always because a modpack hard-codes -Xmx. Clear the JVM arg and restart.

The short version

Could not reserve enough space for object heap means the JVM asked the operating system for more memory than the plan has, and was refused. It happens at startup, before the server runs. The usual cause is a modpack hard-coding an -Xmx value larger than your plan, typically in user_jvm_args.txt.

A Could not reserve enough space for object heap error means the JVM asked the operating system for a heap of a certain size, and the operating system said no. On Hostd, this happens when something inside the pack has set -Xmx to a value larger than the RAM your plan actually has.

#Why this differs from "Java heap space"

OutOfMemoryError: Java heap space is the JVM running out of room while it is already running. Could not reserve enough space for object heap is the JVM failing to start because it cannot get the room it asked for in the first place. They feel similar; the fix is not the same.

#The usual cause: a modpack with a hard-coded -Xmx

Forge and NeoForge packs ship a file called user_jvm_args.txt in the server root. Most packs leave it empty and let the launcher pick. Some hard-code a memory flag like -Xmx8G because that is what the pack author expected on a self-hosted box. If your plan is the 6 GB plan, the JVM tries to grab 8 GB, fails to reserve it, and the server never finishes booting.

user_jvm_args.txt, jvm_args.txt, unix_args.txt, run.sh and the related launcher files are managed by Hostd; the Files page will not let you edit them directly. That is intentional, because the only thing those files can do on a kernel-locked plan is break your boot. The fix lives elsewhere:

  • First, try re-installing the pack version. Open Dashboard → your server → Modpack and pick the pack again. Some pack updates drop the bad -Xmx value in a later release.
  • If a fresh install still ships the bad value, open a support ticket from Dashboard → Support and we will sanitise the JVM args file on our side. We typically clear it within an hour.

If the underlying problem is that the pack genuinely needs more memory than your plan offers, the fix is a tier upgrade rather than a JVM args change; see Allocating more RAM.

#Where to go next

#Frequently asked questions

What is the difference between this and Java heap space?

Could not reserve enough space for object heap happens at startup: the JVM could not get the memory it asked for and never began. OutOfMemoryError: Java heap space happens later: the server was running and exhausted what it had. Different moments, different fixes.

How do I fix Could not reserve enough space for object heap?

Reinstall the pack version first, because some pack updates drop the bad -Xmx value. If a fresh install still ships it, open a support ticket: the JVM argument files are managed by Hostd and are not editable from the Files page, on purpose.

Why can't I edit user_jvm_args.txt?

Because on a plan with hard-reserved RAM, the only thing that file can do is ask for memory the machine will not provide and break your boot. It is managed for you along with the other launcher files.

Written and maintained by the Hostd engineering team. Last updated 2026-05-23. Notice a mistake? Tell us.