How to Fix 'Failed to Check Session Lock' on Your Minecraft Server

Resolve session.lock errors on your Minecraft Java server caused by unclean shutdowns, multiple instances, or world corruption.

"Failed to check session lock, aborting" means the server tried to acquire exclusive access to a world folder and was refused. Minecraft uses a session.lock file to ensure only one server instance writes to a world at a time — and when something goes wrong with that file, the server refuses to start as a safety measure.

What session.lock Does

Every world folder contains a session.lock file. When a server starts:

  1. It opens session.lock and writes a unique value
  2. It keeps the file lock open while running
  3. On clean shutdown, it releases the lock
  4. On the next start, it confirms no other process is holding the lock

If a server is killed (power loss, OOM kill, container restart) instead of stopped cleanly, the lock file may be left in a state the next start can't read — triggering this error.

Why It Happens

CauseHow common
Server killed mid-run (OOM, exit 137, panel kill)Most common
Two server instances on the same worldCommon with cloned servers
Container restart during file writeSometimes
Filesystem corruptionRare
Disk fullRare

Fix It

Make sure no other server is running on this world

Open the XGamingServer Panel Dashboard and confirm only one server is running. If you cloned a server or have multiple instances pointing at the same world, stop all of them.

Critical: Never run two servers on the same world folder. Even briefly. It causes irreversible corruption — chunks get written by both servers and become unreadable.

Stop the affected server

In Console, click Stop. Wait until the Dashboard shows it as fully Offline.

Delete session.lock

Click Files in the sidebar. Open the world folder (world/ by default — or whatever your level-name is). Delete the session.lock file.

If you have separate Nether/End folders (Spigot/Paper format), check world_nether/ and world_the_end/ too — delete session.lock from each.

Safe to delete: session.lock is a runtime lock file. The server recreates it on startup. Deleting it won't affect your world data.

Start the server

Start from Console. The server creates a fresh session.lock and boots normally.

If the Error Comes Back

If session.lock errors keep happening on every restart, you have a deeper issue:

ProblemFix
Server keeps OOM-killingIncrease RAM — see How Much RAM. Each kill leaves a stale lock
Watchdog kills from max-tick-timeFind the lag source with Spark
Two scheduled restarts overlapCheck Schedules for overlapping tasks
World folder corruptedRestore from Backups, or replace level.dat with level.dat_old
Disk fullCheck the panel storage usage
Filesystem error on hostOpen a support ticket — host-side fsck may be needed

Don't Confuse with Other Lock Errors

Error messageWhat it actually means
Failed to check session lockThis guide
Address already in useNetwork port conflict, not file lock
Cannot lock storageSame root cause as session lock — same fix
Session lock check failed for world: worldSame root cause as above

Common Mistakes

MistakeFix
Deleting the whole world folderOnly delete session.lock — never the world itself
Deleting session.lock while the server is runningStop the server first
Ignoring the underlying crash that left the lockFind what's killing the JVM and fix that too
Restoring the lock from a backupDon't — backups shouldn't include session.lock

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page