Minecraft Server Java Exit Codes Explained
Reference for every Java exit code you'll see when your Minecraft server crashes — what each code means and how to fix it.
When your Minecraft server stops, it returns a numeric exit code to the panel. That code tells you how the JVM died, which usually points straight at the cause. Exit code 137? Out of memory. Exit code 0? Clean shutdown. Knowing the codes saves you from digging through logs blindly.
Where to see exit codes: They appear in the Console of the XGamingServer Panel at the very end of a stopped session, e.g.,
Container exited with code 137.
All Common Exit Codes
| Code | Meaning | Common cause | First fix |
|---|---|---|---|
| 0 | Clean shutdown | You stopped the server, or /stop was run | None — not an error |
| 1 | General error | Plugin/mod crash, config error, EULA not accepted | Read first Console error |
| 130 | SIGINT (Ctrl+C) | Manual interrupt | Restart |
| 137 | SIGKILL — Out of memory | RAM ran out, kernel killed the JVM | Increase RAM |
| 139 | SIGSEGV — Segfault | Native lib bug, broken JNI mod | Update Java, remove native mods |
| 143 | SIGTERM | Panel sent stop signal (timed out) | Usually normal — investigate if frequent |
| -1 | Unknown | JVM died without reporting | Check Console + crash reports |
| 127 | Command not found | Wrong Java path / missing binary | Reinstall server |
| 255 | Unrecoverable error | Various — usually startup failure | Read Console |
Exit Code 137 — The Big One
This is the most common crash code. It means the OS kernel killed the JVM because it ran out of memory.
Causes
- Allocated RAM is too low for your modpack/playercount
- Memory leak in a plugin or mod
- Way too high view-distance loading too many chunks
- Massive entity counts (mob farms, item stacks)
- Out-of-control spawners or pathfinding loops
Fixes (in order)
- Increase RAM in the Startup tab. See How Much RAM.
- Apply Aikar's Flags for better GC behavior.
- Lower view-distance and simulation-distance to 6–8.
- Install Spark and run
/spark health+/spark heapdumpto find the leak. - Remove heavy mods/plugins identified by Spark.
- Pre-generate chunks with Chunky.
Don't just throw RAM at it. A 4 GB server hitting 137 with 5 players doesn't need 16 GB — it needs to find the leak. More RAM only delays the crash.
Exit Code 1 — General Error
The server encountered an error during startup or runtime. Exit code 1 is diagnostic-by-Console — the actual cause is somewhere in the log.
Workflow
- Open Console in the panel
- Scroll to the start of the failed startup attempt
- Find the first line with
ERROR,Exception,FATAL, orFailed - Look up that error in Server Won't Start
Common exit-1 triggers
- EULA not accepted (fix)
- YAML config syntax error (fix)
- JSON syntax error (fix)
- Missing dependency for a plugin
- Wrong Java version (fix)
- Corrupted JAR — reinstall
Exit Code 143 — SIGTERM
The panel asked the server to stop and waited a few seconds, then forced it. This is usually normal when:
- You clicked Stop in the panel
- A scheduled restart fired
- The server reached its
max-tick-timeand the watchdog killed it
It becomes a problem if you didn't trigger the stop. Frequent unprompted 143s usually mean:
- The server is hitting
max-tick-time(60 seconds by default) — find the lag source with Spark - A scheduled restart is firing too aggressively
- The watchdog is killing the server during heavy operations like world generation
Exit Code 139 — Segfault
The JVM hit a segmentation fault — usually from broken native code. Rare but ugly.
Causes
- OptiFine, Sodium, or other native rendering mods on a server that doesn't need them (these are client mods!)
- Outdated JNI libraries (LWJGL, native compression)
- Java bug in an old JVM version
- Hardware memory error (rare on hosted servers)
Fixes
- Remove client-side mods from
mods/(servers don't need OptiFine, etc.) - Update Java in Startup to a newer LTS version
- Open a support ticket with the
hs_err_pidXXXX.logfile (the JVM crash dump)
Exit Code 0 — Clean Shutdown
Exit code 0 is success. The server stopped cleanly, no errors, no data loss. You see this when:
- You clicked Stop in the panel
- Someone ran
/stopin chat - A scheduled restart completed normally
If you see exit 0 but didn't stop the server, check if a scheduled task or another admin triggered it.
Reading Exit Codes in Console
Look for one of these patterns at the end of a stopped session:
Container exited with code 137
process exited with code 1
[Server Shutdown Thread/INFO]: Stopping serverThe number is your exit code. The line above usually has the trigger.
Common Mistakes
| Mistake | Fix |
|---|---|
| Treating exit 137 as "the server is broken" | It's almost always RAM. Increase it or fix the leak |
| Treating exit 143 as a crash | It's usually a normal stop or scheduled restart |
| Looking at the last error in Console | The first error is the cause |
| Ignoring exit 0 from unscheduled stops | Someone ran /stop — check op activity |
| Reinstalling on every exit code 1 | Most exit 1 errors are config/plugin issues, not corrupted server files |
Related Guides
How is this guide?

How to Fix 'Failed to Verify Username' on Your Minecraft Server
Diagnose and fix Failed to verify username errors on your Minecraft Java server — Mojang outage, online-mode mismatch, BungeeCord forwarding.
How to Fix 'Kicked for Flying' on Your Minecraft Server
Stop false 'Kicked for flying' kicks on your Minecraft Java server, caused by lag, elytra, vehicles, or movement mods.