To resolve this issue, you need to add the lmdb_max_databases 3; directive in your custom nginx template. This setting is mandatory and supports the incremental sync process by using two databases for seamlessly swapping entity configurations, and one database serves as a pointer to the current active database. The value of 3 is hardcoded and should not be changed.
Here is how you can add the lmdb_max_databases directive to your custom nginx template:
lmdb_environment_path dbless.lmdb;
lmdb_map_size 3072m;
lmdb_max_databases 3;
Ensure that your nginx configuration includes these lines to properly configure the LMDB environment for Kong Gateway v3.10.0.2 in DBLESS mode.
That auto-generated file (compiled from kong/templates/nginx_inject.lua) already declares lmdb_environment_path, lmdb_map_size, and lmdb_max_databases 3; for you, so the simplest and most robust fix — for any current Kong Gateway version, not just 3.10.0.2 — is to confirm your custom template still contains that include line, rather than hand-copying the LMDB directives shown above. Only add the directives manually if your custom template genuinely does not (and cannot) include that file. If you do add them manually, use only lmdb_environment_path, lmdb_map_size, and lmdb_max_databases as shown above — do not add lmdb_encryption_key/lmdb_encryption_mode directives from older LMDB-configuration guidance, as these are no longer valid nginx directives on current Kong Gateway versions and will prevent Kong from starting at all (nginx: [emerg] unknown directive "lmdb_encryption_key").