HTTP 413 "Configuration does not fit in LMDB database" error when pushing config to data planes

Uses: Kong Gateway
TL;DR

Why do configurations fail to push to data planes with an HTTP 413 “Configuration does not fit in LMDB database” error?

Because the default LMDB size is 128m, any configurations that exceed it fail to get pushed to data planes. Increase the size by raising lmdb_map_size (for example, KONG_LMDB_MAP_SIZE=256m, or lmdb_map_size: "256m" on Kubernetes, along with a larger prefixDir sizeLimit).

Problem

The following LMDB error is returned when pushing configuration to data planes:

time="2023-01-31T11:12:33Z" level=error msg="could not update kong admin" error="posting new config to /config: HTTP status 413 (message: \"Configuration does not fit in LMDB database, consider raising the \\\"lmdb_map_size\\\" config for Kong\")" subsystem=dataplane-synchronizer

Solution

Increase the size of the LMDB database by raising lmdb_map_size (for example, KONG_LMDB_MAP_SIZE=256m, or lmdb_map_size: "256m" on Kubernetes, along with a larger prefixDir sizeLimit).

General:

KONG_LMDB_MAP_SIZE=256m

Kubernetes:

env:
  lmdb_map_size: "256m"
deployment:
  prefixDir:
    sizeLimit: 1Gi

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!