Symptoms: Server overloaded, too many entities, entity tick took too long, Can't keep up

Possible Causes

  • Uncontrolled mob farms are producing far too many entities
  • Dropped items pile up on the ground and are never cleared
  • Villager breeding mechanics are not capped
  • Entity limits have never been configured

Step-by-Step Fix

Step 1

Check the current entity count

bash
/spark tps

Step 2

Lower the spawn limits in bukkit.yml

bash
spawn-limits:
  monsters: 50
  animals: 10
  water-animals: 5
  ambient: 1

Step 3

Install the ClearLagg plugin and set up automatic cleanup

bash
/lagg clear

Step 4

Lower the entity-activation-range values in spigot.yml

bash
entity-activation-range:
  animals: 16
  monsters: 24
  misc: 8

Step 5

In an emergency, clear every entity

bash
/minecraft:kill @e[type=!player]