Is your Minecraft server crashing with “Failed to check session lock”? Let’s fix it in minutes with a clean, safe method. With our dedicated Minecraft server, enjoy exceptional performance.
Prerequisites
- Access to your Oxygenserv panel (login and password)
- File Manager or SFTP access (SFTP credentials)
- Server properly stopped (type
stopor use the Stop button) - An SFTP client (e.g., FileZilla) if using SFTP
- A fresh backup of your world folders (
world,world_nether,world_the_end)
Step-by-step
-
Confirm the error in the logs
Open the Console, then viewlogs/latest.log. Look for lines like “Failed to check session lock” or “Aborting, can’t access session.lock”. If present, a stuck session lock is causing the crash. Note the world name if shown (e.g.,ServerLevel[world]) to target the right folder. -
Gracefully stop the server
Click the red Stop button or typestopin the console. Wait until you see “Saving chunks” followed by “Server stopped”. If the panel shows “File in use” later, the server wasn’t fully stopped. Avoid “Force Stop” unless necessary; it can recreate the issue. -
Make a quick backup
Go to Files and locate your world folders: by defaultworld,world_nether,world_the_end. Select them, click “Compress/Zip”, then download. If you use custom worlds (e.g.,survival,creative), back up any folder that contains alevel.datat its root. -
Delete the session.lock file (Java Edition)
In the File Manager, openworld, selectsession.lock, and click Delete. Repeat the same inworld_netherandworld_the_end. For extra worlds (Multiverse, modpacks), open each world root that containslevel.datand delete itssession.lock. If you see “Permission denied” or “File in use”, the server is still running—go back and stop it properly. -
Bedrock Edition: clear lock files
Openworlds, then your world folder (e.g.,MyWorld). Delete thesession.lockinside it. Repeat for every Bedrock world you use. If deletion fails, make sure the server is fully stopped. -
Restart and verify
Click Start. Watch the console for a clean boot with “Done” and no new “Failed to check session lock” messages. Join the server to confirm everything loads fine. If it persists, check disk space, permissions, or potential world corruption. -
Check disk space and permissions if it keeps happening
Ensure you have free disk space (keep at least 1 GB free for world writes). Remove old backups or largelogs/if needed. If permissions are problematic, temporarily renameworldtoworld_oldand start the server: if it boots, the old world is the culprit. Restore from backup or repair affected regions.
Tips & optimization
Always stop with stop or the Stop button to avoid orphaned locks. Keep 10% free disk space; under ~1 GB, writing session.lock may fail. Schedule daily backups and keep 3–7 rotations. To identify world roots, look for level.dat: that’s where session.lock lives. If the issue repeats, update your server jar (Paper/Spigot) and plugins/mods that might cause hard crashes.
FAQ
What is the session.lock file?
A tiny file Minecraft creates in each world to mark it as in-use. If it’s left behind after a crash or hard stop, the server refuses to load that world. Deleting it (while the server is stopped) fixes the lock.
Is it normal that session.lock comes back after restart?
Yes. The server recreates session.lock every time a world is loaded. Do not delete it while the server is running—only when the server is fully stopped.
I can’t find session.lock. What now?
Ensure you’re inside a world root (it contains level.dat). Java defaults: world, world_nether, world_the_end. Bedrock: worlds/YourWorld/. Try SFTP if the File Manager hides small files.
Will deleting session.lock damage my world?
No. session.lock isn’t world data; it’s just a lock. Removing it won’t delete builds or player data. Still, make a backup first for safety.
The error returns every boot. What should I do?
Check free disk space and permissions. Test by renaming world to world_old and starting fresh. If a new world works, restore a clean backup of the old one. Update your server jar and plugins/mods to prevent hard stops.
You’ve got this. Follow the steps and your server will be back online fast. Need help? We’re here for you.