In short: run Paper and update it at least once a week — PaperMC's own advice. Keep the limits in config/paper-global.yml on: packet-limiter, spam-limiter and item-validation. Lag machines are held back by max-tnt-per-tick in spigot.yml, max-chained-neighbor-updates in server.properties and the entity limits in the world config. Put Velocity in front with connection and command rate limits, firewall your game servers, and track the culprit down with the spark profiler and CoreProtect logs.
What crashers do
| Method | What happens | What covers it |
|---|---|---|
| Packet flood | The client sends packets faster than honest play ever would | packet-limiter, spam-limiter in Paper |
| Giant books and items | An item with huge data bloats the chunk and the player data; a chunk with overstacked items kicks everyone who enters it | item-validation, book-size, oversized-item-component-sanitizer, fixes.split-overstacked-loot |
| Lag machines | Redstone clocks, TNT, entity piles: the tick no longer fits in 50 ms | max-chained-neighbor-updates, max-tnt-per-tick, max-entity-collisions, max-block-ticks |
| Chunk generation | Flying fast into unexplored areas makes the server generate the world | chunk-loading-basic, world pre-generation |
| Chat, command and tab-complete spam | Heavy commands and completions in a loop | chat-spam-threshold-seconds, command-spam-threshold-seconds, Velocity limits |
| A wave of connections | Bots clog the login | An antibot and connection limits — see bots and DDoS |
A crash isn't always a dead process. More often the server hangs: a tick never finishes, and after 60 seconds the watchdog stops it. How to read that log is in crash logs. Dupes, which also live on server bugs, have their own article: dupes and exploits.
Packets: Paper's limiter
packet-limiter:
all-packets:
action: KICK
interval: 7.0
max-packet-rate: 500.0
overrides:
minecraft:place_recipe:
action: KICK
interval: 7.0
max-packet-rate: 500.0
spam-limiter:
incoming-packet-threshold: 300
recipe-spam-increment: 1
recipe-spam-limit: 20
tab-spam-increment: 1
tab-spam-limit: 500- `packet-limiter.all-packets` — no more than 500 packets per 7 seconds from one player.
KICKremoves the offender,DROPjust discards the extra packets. - `overrides` — a separate limit for a single packet by its identifier; Paper points to the Minecraft Wiki for the identifiers.
minecraft:place_recipeis there by default. - `spam-limiter` —
incoming-packet-thresholdis the point at which the server treats incoming packets as spam and ignores them; tab-complete and recipe spam get the player kicked. - `rate-limit` in server.properties — the vanilla packet limit before a kick;
0(the default) turns it off. On Paper,packet-limiteris more flexible.
Books and heavy items
| Setting | Default | What it limits |
|---|---|---|
item-validation.book.page | 16384 | A book page's length in characters |
item-validation.book.title and .author | 8192 | Title and author length |
item-validation.book-size.page-max | 2560 | How many bytes one page adds to a book's allowed total; total-multiplier: 0.98 shrinks each following page's share |
item-validation.display-name, .lore-line | 8192 | Item name and lore line length |
item-validation.resolve-selectors-in-books | false | Per Paper's docs, true gives creative-mode players yet another way to crash the server |
unsupported-settings.oversized-item-component-sanitizer.dont-sanitize | [] | Protection against oversized items; per the docs, changing it re-enables exploits |
fixes.split-overstacked-loot (world config) | true | Splits overstacked items so a chunk doesn't become uninhabitable: otherwise players get kicked for oversized packets |
Books are a weapon even without an exploit: a bot writes hundreds of them within the limits, and chests of heavy books bloat the world save. That's a separate kind of abuse — BookBot — and length limits don't stop it.
Lag machines: redstone, TNT and entities
| Setting | File | Default | What it does |
|---|---|---|---|
max-chained-neighbor-updates | server.properties | 1000000 | How many consecutive neighbor updates run before the rest are skipped; a negative value removes the limit |
world-settings.default.max-tnt-per-tick | spigot.yml | 100 | How many TNT are processed per tick |
environment.max-block-ticks, max-fluid-ticks | paper-world-defaults.yml | 65536 | A cap on block and fluid updates per tick — per the docs, a safeguard against hanging |
collisions.max-entity-collisions | paper-world-defaults.yml | 8 | After how many collisions the server stops processing an entity's collisions |
chunks.entity-per-chunk-save-limit | paper-world-defaults.yml | no limits (-1) | How many entities of a given type are saved and loaded per chunk; add the type to the list |
maps.item-frame-cursor-limit | paper-world-defaults.yml | 128 | Markers on a map in an item frame; per the docs, lots of markers can be used to lag clients |
misc.redstone-implementation | paper-world-defaults.yml | VANILLA | ALTERNATE_CURRENT and EIGENCRAFT greatly reduce redstone dust lag but change how dust behaves |
Chunk generation
The server generates new chunks wherever a player goes for the first time, and fast flight into unexplored areas is the heaviest case. The chunk-loading-basic section of paper-global.yml has per-player limits: player-max-chunk-load-rate: 100 and player-max-chunk-send-rate: 75 chunks per second, while player-max-chunk-generate-rate defaults to -1 — generation isn't limited. Limiting the world itself is more reliable: generate it ahead of time and set a border — see pre-generating the world and world border.
Chat and command spam
- The server, 26.2 and newer.
chat-spam-threshold-secondsandcommand-spam-threshold-secondsinserver.properties(default10) kick players who send messages or commands too often;0turns the kick off. - Velocity.
command-rate-limitis the minimum gap between commands, 50 ms by default (20 commands per second);kick-after-rate-limited-commandsis how many commands over the limit a player may send before a kick, and0or lower disables the kick. Tab completion has the same pair:tab-complete-rate-limitandkick-after-rate-limited-tab-completes. - Heavy plugin commands. Don't give everyone commands that generate, search or iterate over lots of blocks. Hand out permissions by group in LuckPerms.
Velocity in front of the server
login-ratelimit = 3000
command-rate-limit = 50
kick-after-rate-limited-commands = 0
tab-complete-rate-limit = 10
kick-after-rate-limited-tab-completes = 0These are the values from Velocity's default config. login-ratelimit is the minimum gap in milliseconds between connections from one IP; 0 disables it. Kicking for command and tab-complete spam is off by default — turn it on with a positive number. Most important, though, is that game servers behind the proxy can't be reached directly: the Velocity docs strongly recommend a firewall and say plainly that modern forwarding doesn't replace one. Step by step in Velocity setup.
If the server hangs anyway
- Early warning. After 10 seconds of hanging, Paper prints a thread dump and repeats it every 5 seconds (
watchdoginpaper-global.yml). TheServer threadstack shows what it's stuck on. - Stop. After 60 seconds without a tick (
settings.timeout-timeinspigot.yml) the watchdog stops the server and, withrestart-on-crash: true, runsrestart-script(./start.shby default). If the operating system killed the process, this mechanism won't restart it. - Restart. It's more reliable to let systemd or Docker bring the server back — see Minecraft server on Linux.
How to find the culprit
- 1
Catch the heavy ticks
/spark tickmonitor --threshold-tick 50reports ticks longer than 50 ms, and/spark profiler start --only-ticks-over 100 --timeout 600records only those. The report shows what eats the tick: redstone, entities, chunk generation or a plugin. Details in the spark profiler. - 2
Find the place
/paper entity listshows how many entities of each type are ticking in a world, and/paper chunkinfohow many chunks are loaded. A pile of one entity type or a hot chunk is the suspicious spot. - 3
Find the builder
CoreProtect shows who placed redstone or spawned entities nearby:
a:+blocklists placed blocks,a:spawnentities a player placed or spawned. Commands in CoreProtect. - 4
Remove it and punish
Roll the build back with
#previewfirst so you don't touch the neighbors, and punish under your rules: "lag machines and deliberate server load are not allowed". How to word it is in server rules.
/co lookup r:30 t:2h a:+block i:redstone_wire,repeater,comparator,observer,piston
/co lookup r:30 t:2h a:spawn
/co rollback u:Steve t:2h r:30 #previewUpdates close new crashes
New ways to bring a server down keep turning up, and they get fixed in new builds of the server software and plugins. PaperMC recommends updating Paper at least once a week, with a backup and never by swapping the jar on a running server; plugins are easy to update through the plugins/update folder — they're replaced on restart. Moving to a new game version is a separate job: updating the server.
Where the anticheat comes in
Paper's and Velocity's limits are the first line: they keep a single player from taking the server down. An anticheat doesn't replace them and doesn't fix bugs in the server software. But many crash exploits are built on packets an honest client never sends — and that's evidence against a specific account. DGuard — the best anticheat for a modern Minecraft server — checks those packets: impossible values (BadPackets), packet order within a tick, and books written by a bot (BookBot). In our comparison only DGuard has a full BookBot check.
| Cheat | DGuard | GrimAC | Vulcan | Polar | Intave | Matrix |
|---|---|---|---|---|---|---|
| BadPacketsimpossible packets | ||||||
| Packet order in a tickthe cheat reorders actions | partly: not described — only a generic protocol check | partly: a combat-protocol check; order inside a tick isn't described | ||||
| BookBotwrites books with a bot | partly: only invalid books; a bot within the limits passes |
DGuard's checks run in network threads — 0.03 % of one core on the main thread — so the anticheat doesn't become one more load on the tick. It works behind Velocity and BungeeCord, and punishments rest on accumulated evidence rather than one odd packet: players join from different versions through ViaVersion, and a rule has to know what's normal for them.
FAQ
How do I protect a Minecraft server from crashers?
Run Paper and update it at least weekly, keep packet-limiter, spam-limiter and item-validation on, rein in lag machines (max-tnt-per-tick, max-chained-neighbor-updates), put Velocity in front with connection and command limits, and firewall your game servers.
What is a lag machine?
A build meant to load the server: redstone clocks, TNT explosions, piles of entities. Ticks stop fitting in 50 ms, and after a long hang the watchdog stops the server. spark and /paper entity list help find it, CoreProtect finds who built it.
What is Paper's default packet limit?
By default packet-limiter allows up to 500 packets per 7 seconds from one player, then kicks them. You can set separate limits for single packets in overrides, and drop the extra packets (DROP) instead of kicking.
Does an anticheat protect against server crashes?
It doesn't replace the server's limits and updates: only a fix closes a bug in the server code. But an anticheat catches the packets exploits are built on: DGuard checks BadPackets, packet order and BookBot.
Sources
- Paper: paper-global.yml (packet-limiter, spam-limiter, item-validation, watchdog)
- Paper: world configuration (world limits)
- Paper: spigot.yml (max-tnt-per-tick, timeout-time)
- Paper: commands (/paper entity, chunkinfo)
- Paper: updating
- Minecraft Wiki: server.properties
- Minecraft Wiki: Java Edition packet identifiers
- Velocity: configuration
- Velocity: default velocity.toml
- Velocity: securing your servers
- spark: command usage
- CoreProtect: commands
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions