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

Re: slapd memory leak (ITS#249)

At 07:08 AM 8/12/99 GMT, dnehring@telemedia.de wrote:
>Full_Name: Dirk Nehring
>Version: 1.2.5
>OS: Solaris 2.6/Sparc
>Submission from: (NULL) (
>OpenLDAP is compiled with egcs-1.0.3, libdb-2.7.5 and
>CFLAGS="-s -O3 -D_REENTRANT" ./configure --enable-shared --enable-cldap
>--with-ldbm-db2 --with-threads=lwp

Don't use LWP.  On some Solaris systems, LWP doesn't reclaim detached
threads.  Use --with-threads=posix instead.

(BTW, to force db2 use "--with-ldbm-api=db2".

>My database is about 70,000 entries big. After modifying all entries with
>slapd leaks memory and dies with:

It likely just growing the cache.  

>Aug 11 19:34:16 xxxxx slapd[22032]: calloc of 2048 elems of 4 bytes failed

Reduce "cachesize" to fit within your available memory or make
more memory available to slapd.

>I looked into the source and found the following line  servers/slapd/modify.c
>Line 77: (*modtail) = (LDAPMod *) ch_calloc( 1, sizeof(LDAPMod) );

It's freed by modlist_free( mods ).