Skip to content

Packet limits ​

Limits how many packets of chosen types each player can send. It is off by default.

Turn it on ​

  1. Add this to server.properties:

    properties
    enable-packet-rate-limiter=true
  2. Edit packetlimitconfig.json if you want different limits.

  3. Restart. The log says Packet rate limiting enabled.

WARNING

Without enable-packet-rate-limiter=true, packetlimitconfig.json does nothing, even though reloadpacketlimitconfig still says it was updated.

The file ​

json
{
  "limitGroups": [
    {
      "minecraftPacketIds": [9, 97],
      "algorithm": {
        "name": "BucketPacketLimitAlgorithm",
        "params": { "drainRatePerSec": 10, "maxBucketSize": 50 }
      }
    }
  ]
}
KeyMeaningAllowed
limitGroupsGroups of packets and their limitRequired, at least one
minecraftPacketIdsPacket numbers in the groupNumbers
nameOnly one algorithm existsBucketPacketLimitAlgorithm
drainRatePerSecSustained packets per second0.0 to 10000.0
maxBucketSizeLargest burst1 to 10000
defaultAlgorithmOptional limit for all packetsSame shape as algorithm

In our test a file with only defaultAlgorithm, or with an empty limitGroups, was rejected.

Example adding a default:

json
{
  "defaultAlgorithm": {
    "name": "BucketPacketLimitAlgorithm",
    "params": { "drainRatePerSec": 100, "maxBucketSize": 100 }
  },
  "limitGroups": [
    {
      "minecraftPacketIds": [9, 97],
      "algorithm": {
        "name": "BucketPacketLimitAlgorithm",
        "params": { "drainRatePerSec": 10, "maxBucketSize": 50 }
      }
    }
  ]
}

These numbers show the format. They are not recommendations.

Shipped limits ​

Packet IDsDrain per secondBucket size
193, 40.00131
9, 971050
931050
1542060
35615

Run reloadpacketlimitconfig after editing (since 1.21.100).

A mistake stops the server

With the limiter on, a broken file stops startup with Failed to load packet limit config and exit code 2. Packet IDs can change between versions, and low limits can disconnect real players. Back up the file first.

Sources: the bundled bedrock_server_how_to.html and tests on 1.26.66.1.

Unofficial community wiki. Not approved by or associated with Mojang or Microsoft.