I have a relatively small OpenLDAP DB (ldif backup file is less than 7M and total size of *bdb files is less than 20M), that handles mostly read requests and few write requests. The servers are configured to run in a cluster env using master-master replication. Recently, the servers ran out of space as the transaction log files accumulated. We deleted the old log files manually (as attemp on using "DB_ARCHIVE -d" failed) and were able to restart one of the servers, however noticed the transaction log files (with default size of 10M) were created too frequently ever since (can be 80 files a day). In peak hours, the 10M transaction log files was generated every min I am sure there were not so many write activities. Does anyone know what could cause the creation of the tranaction log files so frequently? In addition, I had set "set_flags DB_LOG_AUTOREMOVE" flag along with check point settings in one of the servers running in cluster, but the log files were not removed automatically. Am I supposed to set the configurations on each server in the cluster to make it working on any of the servers?
Here are some settings and server information:
- OpenLDAP: slapd 2.4.23 on linux
- In slapd.conf: database bdb ... checkpoint 1024 15 - In DB_CONFIG #the cache size is a little too big, we will tune it down later. Hope this will not be an issue set_cachesize 0 268435456 1 set_lg_regionmax 262144 set_lg_bsize 2097152 set_flags DB_LOG_AUTOREMOVE - a sublist of log files:
-rw------- 1 ldap ldap 10485760 May 11 14:50 log.0000000068 -rw------- 1 ldap ldap 10485760 May 11 14:52 log.0000000069 -rw------- 1 ldap ldap 10485760 May 11 14:53 log.0000000070 -rw------- 1 ldap ldap 10485760 May 11 14:54 log.0000000071 -rw------- 1 ldap ldap 10485760 May 11 14:55 log.0000000072 Thanks, Joanne
Joanne Yan Fu wrote:
I have a relatively small OpenLDAP DB
Here are some settings and server information:
OpenLDAP: slapd 2.4.23 on linux
In slapd.conf: database bdb
Next month release 2.4.23 is seven years old. There have been many, many fixes since then.
While it is possible to tweak the BDB transaction logs settings my recommendation is you should do yourself a favour and
1. upgrade to a recent OpenLDAP release (currently 2.4.44) and
2. migrate to back-mdb which does not have transaction log files at all
Ciao, Michael.
openldap-technical@openldap.org