https://bugs.openldap.org/show_bug.cgi?id=10027
--- Comment #3 from Howard Chu hyc@openldap.org --- It's not as simple as that. UM_MAX is 2^17 by the way, 131072.
When the in-memory dirty list is full, we will try to spill some dirty pages to disk to make room. That works as long as the working set of the transaction can be split up. If you have a single k/v pair larger than the dirty list though, it can't be partially spilled though.
You can try increasing MDB_IDL_LOGN. It impacts a lot of LMDB's internal structures though, so overall RAM footprint will increase a lot.