Roastd / Minecraft

warning

The server is falling behind its own tick loop

What it looks like in your log

Can't keep up! Is the server overloaded? Running 2000ms or 40 ticks behind

What causes it

A tick took longer than the 50ms it is allowed, so the server ran behind real time and skipped ahead to catch up. Players see rubber-banding, delayed block breaks and mobs that stutter.

How to fix it

One burst after a restart, a world upgrade or a chunk pre-generation run is normal. A steady stream is lag with a cause: profile it with spark (/spark profiler start --timeout 120 in the console) rather than guessing. The usual culprits are view-distance and simulation-distance set too high, entity or item build-ups, chunks generating live as players explore, and garbage collection pauses when the heap is too small.

Why it happens

The tick loop has 50ms to do everything: entities, block updates, redstone, chunk loading, saving and networking. When a tick runs over, the next one starts late. When the server is 60 ticks behind, it logs this line and skips ahead to real time, dropping the ticks it owed. Players see rubber-banding, delayed block breaks, mobs that teleport and crops that stall.

One line after a restart, a world upgrade or a chunk pre-generation run is expected: the server was doing a lot at once. A line every few minutes is lag with a cause, and the line itself does not say what the cause is. It says how far behind the server fell.

Fix it step by step

  1. 1Decide whether it is a burst or a streamCount the lines. A handful just after a start-up or a big command is normal. A steady stream during ordinary play is the problem to chase.
  2. 2Profile it with sparkRun /spark profiler start --timeout 120 while the lag is happening, and read the report. The branch of the server thread over about 15% is the suspect. The spark guide on this site walks through the reading order.
  3. 3Check the two distancesview-distance and simulation-distance in server.properties decide how many chunks tick per player. 12 and 10 on a busy server is expensive; 8 and 6 halves the loaded area. Change them, restart, and see whether the stream stops.
  4. 4Look for an entity pilespark lists entities per chunk. Over 120 in one chunk is a farm or a pen that needs a killing layer or a cull. Go to the coordinates.
  5. 5Check memoryIf the heap is over 90% full, garbage collection pauses are the cause and the fix is on the memory page. A server that is short of RAM shows the same symptom as a server with a slow plugin.

If that didn't work

If TPS is 20 and MSPT is low in spark but players still stutter, the problem is not the server tick. It is network, or their client. No server-side change will fix it.

If the lines come in a burst every few minutes with nothing in between, look for a scheduled task: world saving, a backup plugin, or a mod that scans the whole world on a timer.

Not sure this is your problem? Paste your log and Roastd will tell you which of these it actually matched, and what else it found.

Check your own log
Read more: Diagnosing server lag →

Errors that travel with this one