Hi Ryan,Here's my config of LDAP master:---------------------------------------------------------------------------# cat /etc/openldap/slapd.conf | grep -v ^# | grep -ve '^$'include /etc/openldap/schema/core.schemainclude /etc/openldap/schema/cosine.schemainclude /etc/openldap/schema/inetorgperson.schemainclude /etc/openldap/schema/nis.schemaallow bind_v2pidfile /var/run/openldap/slapd.pidargsfile /var/run/openldap/slapd.argsmodulepath /usr/lib64/openldapmoduleload accesslog.lamoduleload syncprov.laTLSCACertificateFile /etc/openldap/certs/CA.pemTLSCertificateFile /etc/openldap/certs/ldap-master.pemTLSCertificateKeyFile /etc/openldap/certs/ldap-master.keyTLSVerifyClient allow[ .. some limits here .. ][ .. some ACLs here .. ]database configaccess to *by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manageby * nonedatabase monitor[ .. some ACLs here .. ][ .. some limits here .. ]database bdbcachesize 380000idlcachesize 700000readonly offsuffix "dc=domain,dc=com"rootdn "cn=Manager,dc=domain,dc=com"rootpw {SSHA}XXXXXXXXXXdirectory /var/lib/ldapindex uid eqindex mail eqindex objectClass eqindex entryCSN eqindex entryUUID eqoverlay syncprovsyncprov-checkpoint 100 10syncprov-sessionlog 100[ .. some limits here .. ]loglevel sync stats stats2 shellcheckpoint 5120 10serverID 1---------------------------------------------------------------------------Here's what I have on replica server:---------------------------------------------------------------------------include /etc/openldap/schema/core.schemainclude /etc/openldap/schema/cosine.schemainclude /etc/openldap/schema/nis.schemainclude /etc/openldap/schema/inetorgperson.schemaallow bind_v2pidfile /var/run/openldap/slapd.pidargsfile /var/run/openldap/slapd.argsthreads 8[ .. some ACLs here .. ]database configaccess to *by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manageby * nonedatabase monitor[ .. some ACLs here .. ]database bdbcachesize 380000idlcachesize 700000readonly offsuffix "dc=domain,dc=com"rootdn "cn=Manager,dc=jetbrains,dc=com"rootpw {SSHA}XXXXXXXXXXXXXXXXXdirectory /var/lib/ldapindex uid eqindex mail eqindex objectClass eqindex entryCSN eqindex entryUUID eqcheckpoint 5120 10syncrepl rid=34provider=ldaps://ldap-master.domain.net:636tls_reqcert=demandtls_cacert=/etc/openldap/certs/CA.pemtype=refreshAndPersistschemachecking=offsearchbase="dc=domain,dc=com"scope=subbindmethod=simplebinddn="cn=repluser,ou=Accounts,dc=domain,dc=com"credentials=XXXXXXXXXXretry="300 +"updateref ldaps://ldap-master.domain.net[ .. some limits here .. ]loglevel stats sync stats2 shell---------------------------------------------------------------------------I restarted slapd with "LD_PRELOAD=/usr/lib64/libtcmalloc.so.4.1.0" to use a different memory allocator (tcmalloc) and now memory consumption is almost flat, please see http://i.imgur.com/brIvarB.pngI've also added "threads 8" directive into slapd.conf on LDAP master server but have not started the slapd process to make it active.According to what I see from the OS (Linux) perspective, slapd is using 18 threads:# ps -L -o pid= -p `pgrep slapd` | wc -l18> Do your logs show what kind of client activity triggered the growth?I have some logs but I nothing really special there. No unusual activity.Regards,Sergey--On Sun, Mar 29, 2015 at 10:16 AM, Ryan Tandy <ryan@nardis.ca> wrote:Hi,
On Thu, Mar 26, 2015 at 01:50:27PM +0300, Sergey Esin wrote:
Hi all,
We're running OpenLDAP 2.4.40 (the latest available release) with just one
replica server (connected via TLS) and have the following picture -
http://i.imgur.com/om0lMiy.png
On the graph you can see memory consumption of the slapd process on the
host: in the beginngin it started without replica, then replica server was
connected (memory consumption became around 4 Gigs) and then OOM
(out-of-memory) killer on linux machine just killed the process.
I've seen a similar thing recently. The test case I posted to ITS#8081 causes very high memory usage on the host. (The crash bug is unrelated, it was a regression introduced after 2.4.40 was released.) Are you able to share your host config for comparison?
Howard wrote https://github.com/hyc/mleak while looking into it, but AFAIK we don't have a proven cause, only a suspicion that memory fragmentation may be involved.
Do your logs show what kind of client activity triggered the growth?
Do you use delta-syncrepl?
There are ~400 000 users in our ldap database.
OpenLDAP was compiled from sources using "./configure --prefix=/ldap2440
--with-tls --enable-slapd".
Are there any ways to understand what's is going wrong and how to fix it?
This server is really important for us, please share any ideas how to make
it stable!
My DB_CONFIG is like below:
set_flags DB_LOG_AUTOREMOVE
set_cachesize 0 524288000 5
set_lg_regionmax 1048576
set_lg_max 10485760
set_lg_bsize 2097512
set_lk_max_locks 23000
set_lk_max_lockers 2300
set_lk_max_objects 2300
--
Regards,
Sergey
Regards,
Sergey