[Date Prev][Date Next]
Memory Leak in slapd (or did I miss something configuring?)
- To: firstname.lastname@example.org
- Subject: Memory Leak in slapd (or did I miss something configuring?)
- From: Thomas Rasmussen <email@example.com>
- Date: Thu, 25 Aug 2011 09:15:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; bh=lX0lLZ4OhPksVMGmAiPyFTvVLOFFKgJ/Hzo37P1nduU=; b=CKHOOsh/9ht6bAt0BsiSUWDvTt5W/O4rgu6MKP17ZwbcuV/77w7+w8qa+jX/7YR0Qc XJDhaug3NsakQKtshqhK/SBjTrY/p2cP1IRqNWWbQH3+j+EMkP+19ospVpuTQyl8dAEi FXFvYj/xVUxZZZd8lfYroZy1FM2jwcDHwU8Jo=
Hello (originally posted to -bugs list, but think this might be the correct list)
I have an openldap installation setup which appears to have a memory leak which I have not been able to solve by upgrading software etc. which is why I'm submitting this, if this is the wrong list, please let me know.
The setup is:
- OpenLDAP server running 2.4.26, compiled against db-5.2.28, heimdal 1.2.1.
- Server is SunOS servername 5.10 Generic_141445-09 i86pc i386 i86pc, 6GB of RAM and 5GB of swap (in a VMWare ESX environment)
I have the following in my DB_CONFIG file:
set_cachesize 0 52428800 0
In my slapd.conf I have the following entries (I stripped out some restricts and other irrelevant lines)
index objectClass,entryCSN,entryUUID eq
checkpoint 128 1
syncprov-checkpoint 100 10
Just FYI, the server is a clone of another server currently running syncprov replication between two nodes, hence the syncprov lines. This server has the same databases as the production ones, but I just moved it to isolated area and removed all sync options from slapd.
My database is rather big:
vs24n02z2.prl1:/pack/openldap/var/openldap-crl root$ du -sh *.bdb
but I'd imagine this not beeing a problem (other than some performance issues, but this is not the problem here).
Now, when I start up my slapd, it consumes around 6MB RAM, all is fine, I can perform searches and updates without problems. But my memory consumption is going through the roof!
If I perform a search through the part of the database having alot of data, I suddenly find slapd using 500+ MB of memory...
In our production setup, we actually see that after a couple of weeks, slapd is consuming 3+ GB of memory, and then at some point hits a Out of memory, and crashes.
Our production setup is infact a openldap 2.4.22 with berkeley db 4.6.21, and my test server (cloned in a vmware environment) has just upgraded this environment by this recipe:
* db_checkpoint -1
* db_recover -h <path to bdb files>
* Loop through all bdb files: db_upgrade <bdb file>
* install openldap 2.4.26 (compiled against db-5.2.28)
* start slapd
The server which updates the LDAP is performing many search and updates, which is probably why memory consumption is exploding after restarts?
Now, my main concern is, how (if possible) can we procede with this? We really need to find the problem as this causes production problems whenever the ldap crashes.