diff --git a/postfix/HISTORY b/postfix/HISTORY index 1e58fa1c9..d9d9d5b2f 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -18943,3 +18943,14 @@ Apologies for any names omitted. util/dict_open.c, util/dict_alloc.c, util/dict_lmdb.c, postmap/postmap.c, postalias/postalias.c, proto/LMDB_README.html, proto/postconf.proto. + +20130928 + + Cleanup: the lmdb_max_readers property is now configurable. + This is a hard limit built into the OpenLDAP library that + causes requests to fail when the number of open read + transactions exceeds the limit. When this happens the LMDB + client logs a MDB_READERS_FULL warning and continues with + reduced performance. Files: util/dict_lmdb.c, util/dict_lmdb.h, + global/mail_params.h, global/mail_params.c, proto/postconf.proto, + proto/LMDB_README.html. diff --git a/postfix/README_FILES/LMDB_README b/postfix/README_FILES/LMDB_README index 5d3baeb17..13203e68e 100644 --- a/postfix/README_FILES/LMDB_README +++ b/postfix/README_FILES/LMDB_README @@ -39,13 +39,19 @@ The exact pathnames depend on how OpenLDAP LMDB was installed. CCoonnffiigguurree LLMMDDBB sseettttiinnggss -Postfix provides one configuration parameter that controls OpenLDAP LMDB -database behavior. +Postfix provides configuration parameters that control OpenLDAP LMDB database +behavior. * lmdb_map_size (default: 16777216). This setting specifies the initial OpenLDAP LMDB database size limit in bytes. Each time a database becomes full, its size limit is doubled. + * lmdb_max_readers (default: $default_process_limit). This specifies a hard + limit on the number of read transactions that may be open at the same time + for the same OpenLDAP LMDB database. When this number is too small, the + Postfix LMDB client will log MDB_READERS_FULL warnings, and will run with + reduced performance. + MMiissssiinngg pptthhrreeaadd lliibbrraarryy ttrroouubbllee When building Postfix fails with: @@ -68,6 +74,26 @@ that don't exist with other Postfix databases. Some failure modes have been eliminated on the course of time. The writeup below reflects the status as of of LMDB 0.9.8. +UUnneexxppeecctteedd ""rreeaaddeerrss ffuullll"" eerrrroorrss.. + +Problem: + Under heavy load, database read operations fail with MDB_READERS_FULL + errors. This problem does not exist with other Postfix databases. + +Background: + The LMDB implementation enforces a hard limit on the number of simultaneous + read requests for the same database environment. This limit must be + specified with the lmdb_max_readers configuration parameter. + +Mitigation: + Postfix logs a warning suggesting that the lmdb_max_readers parameter value + be increased, and retries the failed operation for a limited number of + times while running with reduced performance. + +Prevention: + Monitor your LMDB files for MDB_READERS_FULL errors and make the necessary + adjustments. Consider using CDB for read-mostly databases. + NNoonn--oobbvviioouuss rreeccoovveerryy wwiitthh ppoossttmmaapp((11))//ppoossttaalliiaass((11))//ttllssmmggrr((88)) ffrroomm aa ccoorrrruupptteedd ddaattaabbaassee.. diff --git a/postfix/html/LMDB_README.html b/postfix/html/LMDB_README.html index 2c6dbb597..0ca095db9 100644 --- a/postfix/html/LMDB_README.html +++ b/postfix/html/LMDB_README.html @@ -69,7 +69,7 @@ build Postfix with OpenLDAP LMDB support, use something like:
Postfix provides one configuration parameter that controls +
Postfix provides configuration parameters that control OpenLDAP LMDB database behavior.
lmdb_max_readers (default: $default_process_limit). This +specifies a hard limit on the number of read transactions that may +be open at the same time for the same OpenLDAP LMDB database. When +this number is too small, the Postfix LMDB client will log +MDB_READERS_FULL warnings, and will run with reduced performance. +
+Unexpected "readers full" errors.
+ +Under heavy load, database read +operations fail with MDB_READERS_FULL errors. This problem does not +exist with other Postfix databases.
The LMDB implementation enforces a +hard limit on the number of simultaneous read requests for the same +database environment. This limit must be specified with the +lmdb_max_readers configuration parameter.
Postfix logs a warning suggesting +that the lmdb_max_readers parameter value be increased, and retries +the failed operation for a limited number of times while running +with reduced performance.
Monitor your LMDB files for +MDB_READERS_FULL errors and make the necessary adjustments. +Consider using CDB for read-mostly databases.