Skip to content

size of the LMDB database file does not change #323

@dvmalygin

Description

@dvmalygin

Hello, I'm using ModSecurity-nginx with lmdb support and REQUEST-912-DOS-PROTECTION rule.
The size of the lmdb database (modsec-shared-collections file) is always 1MB and does not change.
To determine the actual size of the database, I used the commands described here:
https://wiki.samba.org/index.php/Using_the_lmdb_database_backend
image (13)

1MB size is not enough. Not all IP addresses are recorded in the database and "expire" does not work correctly.
This is what an entry with "expire" looks like:
key: 0x7f307db15d66 **ip_address**_85a8bfc5e4d8eebd5dee39313b7462b0aacedf6e::::dos_block, data: 0x7f307db15daa {"__expire_":1713440905,"__value_":"1"}
The "dos_block" flag has an expiration date - the time until which the IP address is blocked.

This is what a record that blocks an IP address forever (without expiration date) looks like:
key: 0x7f3444f23192 **ip_address**_4dc3eb4c759ce8aa387ad1a757061a314d369738::::dos_block, data: 0x7f3444f231d5 {"__value_":"1"}

Expire records stop being written to the lmdb database when there is a large number of IP addresses. I suspect that this is due to the lmdb database being full.
Is it possible to increase the size of the lmdb database?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions