// crash guide
Minecraft server crash: corrupt chunk or world data
Couldn't load chunk and Failed to read chunk mean part of your world save can't be read, usually because a crash cut a save short or a mod was removed. You can usually fix it by restoring or resetting one small area, not the whole world.
What the error looks like
Chunk errors don't always crash the server. Often it keeps running and just logs them, so search logs/latest.log first. Forge and NeoForge also write logs/debug.log, which has more detail around the error. If the server did crash, open the newest file in crash-reports/. The start of each line differs by loader, but the message reads like this:
Couldn't load chunk [-37, 112]
Failed to read chunk [-37, 112]
Newer versions, such as 1.21, word the first one differently, with no brackets:
Failed to load chunk -37,112
Older versions such as 1.12.2 use similar wording, but may print the coordinates without brackets or leave them out. Below the line, a Java exception (sometimes on a Caused by: line) says what was wrong with the data:
java.io.EOFException: Unexpected end of ZLIB input stream
java.util.zip.ZipException: invalid distance too far back
java.util.zip.ZipException: incorrect header check
Some damage produces no exception at all. Minecraft logs one line, skips the chunk and generates a new one in its place. On modern versions these lines look like this:
Region file ./world/region/r.-2.3.mca has an invalid sector at index: 539; sector 2049 is out of bounds
Chunk [-37, 112] header is truncated: expected 8192 but read 0
Chunk [-37, 112] stream is truncated: expected 12000 but read 8187
Chunk [-37, 112] is allocated, but stream is missing
Chunk file at [-37, 112] is missing level data, skipping
And this one shows up after region files were copied or renamed:
Chunk file at [-37, 112] is in the wrong location; relocating. (Expected [-37, 112], got [-5, 80])
The coordinates in these lines are chunk coordinates, not block coordinates. Write them down. You need them to find the file.
What it means
A world is stored in region files. Each r.X.Z.mca file holds 32 × 32 chunks (512 × 512 blocks), each compressed on its own. These errors mean one chunk, or the file's index of chunks, no longer makes sense. The usual causes:
- The server stopped mid-save. A crash, an out-of-memory kill, a power cut or a forced kill stopped Java halfway through writing. That leaves cut-off data:
EOFException,stream is truncated,header is truncated. - The disk filled up. Saves fail partway and leave the same damage.
- A mod was removed or updated. Its blocks and entities are still saved in the chunk. Usually Minecraft just drops what it doesn't recognize, but sometimes loading that data fails.
- Files were moved by hand. Region files copied between worlds, renamed, or edited while the server ran.
- The world was opened in an older version. Minecraft doesn't support loading a world in an older version than the one that last saved it, and doing so can damage chunks.
When a chunk can't be read, Minecraft usually logs the error and generates fresh terrain in its place. The next save writes that over the old data. If builds have turned into untouched terrain with sharp straight edges, stop the server now, before it saves again. If the server crashes instead, it's usually a mod failing on data inside that chunk.
Common in these packs: no pack causes it by itself. It follows hard stops and removed mods, so it's more likely on big packs that need a lot of memory, like All the Mods 10, and on packs whose updates can add or drop mods, like Monifactory (still in beta). Take a backup before every pack update.
How to fix it
- Stop the server cleanly and back up. Type
stopin the console or use the panel's Stop button, not Kill. Copy the whole world folder somewhere safe. Its name islevel-nameinserver.properties(defaultworld). Never change region files while the server runs; it will save over your changes. - Find the file. Divide each chunk coordinate by 32 and round down. Chunk [-37, 112] is in
r.-2.3.mca: -37 ÷ 32 = -1.16, which rounds down to -2, and 112 ÷ 32 = 3.5, which rounds down to 3. From block coordinates, divide by 512 instead. On 1.18.2 and newer, the F3 screen also shows the region file name. Then pick the folder:- Overworld:
world/region/(on 26.1 and newer:world/dimensions/minecraft/overworld/region/) - Nether:
world/DIM-1/region/(26.1+:world/dimensions/minecraft/the_nether/region/) - End:
world/DIM1/region/(26.1+:world/dimensions/minecraft/the_end/region/) - Modded dimensions (1.16+):
world/dimensions/<modid>/<name>/region/. On 1.12.2 and older, numberedDIMfolders.
poi/(1.14+) andentities/(1.17+) folders next toregion/, with files of the same names. A path in the log tells you which one is damaged. Minecraft 26.1 also moved player data fromplayerdata/toplayers/data/. - Overworld:
- Removed or updated a mod just before this started? Put it back. Same mod, same version. If the chunks load again, the data was fine. To remove a mod for good, take its blocks out of the world first, and back up before you try. Our modpack update guide covers what to check before an update drops a mod.
- Best fix: restore that one file from a backup. Copy
r.-2.3.mcafrom a backup made before the problem started over the damaged one. The newest backup may already contain the damage, so check its date. Copy the same-named files inentities/andpoi/too, so mobs and villagers match the terrain. Only that area rolls back; the rest of the world keeps today's progress. On a Pelican panel (what DSN uses), download a backup from the Backups tab, extract it on your computer, and upload the files with the file manager or SFTP. Restoring the whole backup also works, but rolls back everything. - No backup? Delete only the broken chunks. MCA Selector is a free desktop tool that edits region files directly, so it works on modded worlds. Download the world folder, open it, go to the coordinates, select the bad chunks, delete them, and upload the changed files. Those chunks regenerate on the next visit. Builds in them are lost; the rest of the region survives.
- Last resort: delete the region file. Remove
r.-2.3.mcaand its same-named files inentities/andpoi/. The whole 512 × 512 area regenerates from the seed. With the same seed, Minecraft version and world generation mods, it should line up with its neighbors. Builds there are gone. - If the error names
level.dat: that file holds the seed, game rules and spawn. Rename it tolevel.dat_broken, then copylevel.dat_old(the previous save) tolevel.dat. Iflevel.dat_oldis damaged too, restorelevel.datfrom a backup. - For
in the wrong location: the server keeps running and loads the chunk at the position it expected, but the message can repeat every time that chunk loads. Go and look (see below). If the terrain lines up with its neighbors, only the stored position is off and you can leave it. A whole region of these means a file was copied to the wrong name, and you'll see terrain that belongs somewhere else. The "got" coordinates show where the chunks came from: in the example above,r.-1.2.mcawas copied overr.-2.3.mca. Restore the right file from a backup.
Forge and NeoForge vs Fabric and Quilt
Region files use the same vanilla format on every loader, so the steps don't change. The logs do. Forge and NeoForge stack traces show readable Minecraft class names, and logs/debug.log has extra lines around the error. On 1.21.11 and older, Fabric and Quilt show Minecraft classes as numbered names like net.minecraft.class_1234, so look for mod package names in the trace instead. From 26.1 on, Minecraft isn't obfuscated and the names are readable on every loader.
Stop it coming back
- Stop with
stopor the Stop button. Save Kill for a frozen server. - On 1.16 and newer, keep
sync-chunk-writes=trueinserver.properties(the default). Chunk writes go to disk straight away, so a crash is less likely to leave a half-written file. - Keep free disk space, and fix whatever keeps crashing the server.
- Back up before changing mods, and keep more than one backup. The update guide has the full checklist.
Not the same error: Exception generating new chunk means a world generation mod crashed while making new terrain. Deleting chunks won't help; update or remove the mod in the stack trace. Ticking block entity and Ticking entity crashes also give coordinates, but are usually a bug in the mod that owns that block or mob.
How to check it's fixed
- Start the server and search
logs/latest.logfor the chunk coordinates and region file name. No newCouldn't load chunk,Failed to load chunk,Failed to read chunkortruncatedlines should appear. - Go and look. Block coordinates are chunk coordinates × 16, so chunk [-37, 112] starts at block -592, 1792. From the console:
gamemode spectator YourName, thentp YourName -584 120 1800. Check that terrain lines up at the chunk edges and your builds are there. - Run
save-all flush, restart, and check the log again. A chunk that saves and loads cleanly is fixed. - Take a fresh backup now that the world is clean.
Related crash guides
Backups you can restore.
DSN backs up every server nightly to off-site storage and test-restores a real backup every month, with 5 on-demand backups to take before you change mods. We're moving DSN Servers to new hardware, and ordering is closed until then. Join the launch list and we'll email you when servers open.