Categories
Project Zomboid B42 — Server Fails to Start (Out of Memory)
The Problem
On Project Zomboid Build 42 (B42), dedicated servers may fail to start with a Java Memory Error during startup. This is not caused by corruption or mods — it happens because the default Java heap allocation is too aggressive for the server resources available.
Who Is Affected
- Project Zomboid Build 42 servers
- Servers with 8 GB RAM or less
B42 has significantly higher memory requirements than B41 due to expanded world generation and new game systems. Servers with less than 6 GB RAM may struggle even with optimized settings.
How to Fix
Option 1: Startup Variable (Recommended)
- Go to the Startup tab in your game panel
- Look for a MAX_RAM, JAVA_MEMORY, or similar variable that controls memory allocation
- Reduce the value according to the table below
- Restart your server
Option 2: Edit Configuration File
If no startup variable is available:
- Go to the Files tab in your panel
- Open
ProjectZomboid64.jsonin your server root folder - Find the line
"-Xmx8g" - Change it to a lower value (see table below)
- Save and restart the server
Note: On some Pterodactyl eggs, this file may be overwritten on restart. If your changes do not persist, use the Startup variable method or contact support.
Recommended Memory Values
| Server RAM | Recommended -Xmx |
|---|---|
| 8 GB | -Xmx6g |
| 6 GB | -Xmx4g |
| 4 GB | -Xmx3g |
The value should always be lower than your total server RAM to leave room for the operating system and other processes.
Still Crashing?
- If the server starts but crashes after running for a while, your server may need more RAM for your world size and mod count
- Remove unnecessary mods to reduce memory usage
- If you have optimized settings and are still hitting limits, consider upgrading your plan
Still need help?
Create a Support Ticket