Why your server keeps restarting, and how to fix it

A server that starts, runs for a short time and then restarts on its own is frustrating, because the console scrolls past before you can read what happened. The cause is nearly always one of a small number of things, and the clue is in the log just before each restart. This guide shows how to find the real reason instead of guessing.

First, stop the loop

An auto-restart feature can hide the error by relaunching the server before you read it. If you can, turn off auto-restart or stop the server, then start it manually once and watch. You want to see the very first error, not the tenth repeat. Start, stop and restart your server covers the controls.

Find the reason in the logs

Look at the console, and then at the log file in the logs folder. Search for the last lines before the restart. Words to look for:

Words in the logLikely cause
OutOfMemoryError, Killed, exit code 137The server ran out of memory
Can't keep up followed by a watchdog messageThe server froze, and a watchdog shut it down
Exception, Caused byA plugin, mod or world error
Address already in useAnother process holds the port
Failed to bind to portThe port is taken or not allowed
Could not load, UnsupportedA broken or incompatible plugin or version
You have been banned, crash reportA crash with a report file

How to read your server logs explains how to find the first real error in a long file.

Cause 1: out of memory

This is the most common reason. When the server uses more memory than your plan allows, the system ends the process, often with exit code 137 and no friendly message. Signs: it runs fine for 20 minutes to a few hours, then dies, usually when more players join or more chunks load.

What to do:

Cause 2: the watchdog

Some server software has a watchdog that shuts the server down if a single tick takes too long, for example when a plugin or a huge redstone machine freezes the main thread. The log shows a thread dump and a message about the server not responding. Find what was running: the dump often names the plugin. Remove or update it, and profile the server. See Understand TPS and MSPT.

Cause 3: a crash from a plugin or mod

A crash report is written to crash-reports for Minecraft, and the log names the file. Typical fixes:

  1. Remove the most recently added plugin or mod and restart.
  2. Update everything to versions that match your game version.
  3. If you cannot tell which one, remove half and restart, then narrow down.

See Mod hygiene for game servers and Server crashing on startup.

Cause 4: a corrupt world or chunk

A server that dies when a particular area loads, or right after starting, may have a damaged region file. The log mentions a chunk or region file. Restore a backup, or follow How to repair a corrupted Minecraft world. Always copy the world first.

Cause 5: a script or scheduled restart

Check that you did not schedule a restart that fires too often. Review the panel schedules and any plugin that restarts the server. See Schedule automatic restarts and backups. A schedule set to every 6 minutes instead of every 6 hours is easy to do.

Cause 6: port conflicts

If a second program, or a second copy of the server, tries to use the same port, the new one fails to bind and exits. Check you are not running duplicates and that your port setting is correct. See How game server ports work.

Cause 7: running out of disk space

A full disk can crash a server when it tries to save the world or write logs. Check usage in the dashboard and remove old backups and logs. See Fixing "No space left on device".

Cause 8: a bot or app crashing in a loop

For a Discord bot, a crash on start means a bad token, a missing environment variable or an unhandled error. A process manager will keep restarting it. Read the first error, and fix the root problem. See Fix invalid token errors and Keep your bot online. Be careful: a restart loop can also hit the platform's rate limits. See How to handle Discord rate limits.

A method that always works

  1. Stop auto-restart and start the server once.
  2. Note the exact time it dies.
  3. Read the log lines just before that moment.
  4. Match the message to a cause above.
  5. Change one thing, then test again.
  6. If it was caused by your last change, undo it.

When to ask for help

If the log gives no clue, or the server is killed with no message, open a ticket with the last 50 lines of the log, the time of each restart and what you changed recently. How to write a support request lists the details that make a fix faster. Include your Server ID.


Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.