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

Re: openldap hangs on bdb / database corruption



Am Fr, den 11.06.2004 schrieb Buchan Milne um 11:36:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ingo Steuwer wrote:
> | Hi
> |
> | I'm using openldap 2.1.30 and bdb 4.2.52 from the latest debian-sources
> | with a somewhat large ldap (about 100.000 entries).
> 
> Is that db-4.2.52 or 4.2.52.1 or 4.2.52.2 ? You need at least 4.2.52.1.

Its debian Package 4.2.52-16, the latest Patch mentioned in changelog is
4.2.52.2.

> |
> |>From time to time the database seems to hang, ldapsearch gets no answers
> | and even db4.2_stat hangs at some point (needs kill -9 then). In this
> | cases I need to stop slapd and do a db4.2_recover.
> |
> 
> Looks like you might be exceeding 2GB of transaction logs which are in use.
[..]
> | relevant configruation-parts:
> |
> | slapd.conf:
> | ---------------------------------------------------
> | sizelimit               unlimited
> | modulepath      /usr/lib/ldap
> | moduleload      back_bdb.so
> |
> | database        bdb
> |
> | cachesize       500000
> | index
> | objectClass,uidNumber,gidNumber,memberUid,ou,uniqueMember pres,eq
> | index           uid,cn,sn,givenName,mail,description,displayName
> | pres,eq,sub
> | index           sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
> | index           default sub
> | ---------------------------------------------------
> |
> 
> You don't appear to have a checkpoint setting, which would mean that all
> your transaction logs are open (or something to that effect, based on
> what I've seen).

That's true, I added "checkpoint 1024 1" now in slapd.conf. It may take
some days to see if it is the reason.

But is it true that the log-files which contains only 10MB each are held
open ? I thought this would be done only for the last=actual one, I
mean, for what reason should thy all be open ?

Well, as I have 211 logfiles now they are bigger than 2G all together.

> | DB_CONFIG:
> | --------------------------------------------------
> | set_cachesize 0 536870912 1
> | ---------------------------------------------------
> 
> Without some log transaction settings, your machine must be doing a lot
> of IO all the time ... and write performance must be quite bad ...

That's true, unfortunately. But after some trouble with incomplete
logfiles and incomplete db_recover I prefer them to be writen at once.

I tried i.E. in DB_CONFIG:
set_lg_regionmax 262144
set_lg_bsize 2097152

but had trouble with db_recover.

> Regards,
> Buchan
> 

Thanks
Ingo Steuwer