[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5860) slapd memeory leak under openldap 2.4



--On Thursday, January 22, 2009 4:46 PM +0000 rlvcosta@yahoo.com wrote:

> [root@brtldp12 yum.repos.d]# ll /usr/man/man8/slapd.8.gz
> -rw-r--r-- 1 root root 4392 Jan 22 03:28 /usr/man/man8/slapd.8.gz
>
> [root@brtldp12 yum.repos.d]# ll /usr/man/man5/slapd-bdb.5.gz
> -rw-r--r-- 1 root root 4089 Jan 22 03:28 /usr/man/man5/slapd-bdb.5.gz
>
> I was expecting to find information about dncachesize in slapd-bdb but
> there isn't nothing there.

[build@build11 man5]$ grep dncachesize *
slapd-bdb.5:.BI dncachesize \ <integer>
slapd-hdb.5:.BI dncachesize \ <integer>

It's documented for me...

.BI dncachesize \ <integer>
Specify the maximum number of DNs in the in-memory DN cache. The
default is twice the \fBcachesize\fP. Ideally this cache should be
large enough to contain the DNs of every entry in the database.

You can also find it in the online manual pages:

<http://www.openldap.org/software/man.cgi?query=slapd-bdb&apropos=0&sektion=0&manpath=OpenLDAP+2.4-Release&format=html>

>
> In any case slapd never respects memory limitation and consumes it
> without boundaries. It also never releases any memory.
>
> Then after sometime the process cannot allocate more memory and crashes.

As Howard noted, you need to use an alternative memory allocator than 
glibc.  Investigate horde or tcmalloc.

--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration