[Date Prev][Date Next]
Re: my searchs doesn't use indexes
Isaac Cruz Ballesteros wrote:
> > If you're running ldap as a non-root user (it's a good thing), make sure
> > all the .ldbm files are owned by that user.
> slapd as root :-) It's in a private network anyway
> > I have had index corruption problems with OpenLDAP and GDBM. Running
> > slapindex would not fix the problem. The problems didn't go away until
> > I switched to Berkeley DB 3.3.11 as the backend database.
> > My experience is that GDBM files also tend to get very large very fast
> > if you do lots of updates. Reloading the database (stop ldap; slapcat >
> > foo.ldif; slapadd -c < foo.ldif; chown -R <ldap user> /var/lib/ldap;
> > start ldap) will shrink the files again on a temporary basis. Berkeley
> > DB does not have this problem.
> OK, so it seems I must update to Berkeley DB... Which version should I use?
> version 4.0.14 is available in www.sleepycat.com, but is it reliable enough to use
> in a production system?
Sorry, I've only used 3.3.11. Perhaps someone else can share
experiences using 4.0.14? I seem to recall some messages about it,
perhaps you could search the archive.
> Also, which version of OpenLDAP should I use? What type of backend in slapd.conf,
> ldbm or bdb?
I'm still using ldbm. The bdb backend is supposed to be better
(fine-grained locking, etc.) but I have no experience with it.
> > Also, GDBM can't handle individual files larger than 2GB. Updates that
> > would increase the file size past that limit return I/O errors and crash
> > the slapd process. Hopefully you run multithreaded so this will not
> > immediately terminate all LDAP service. If your id2entry.ldbm is
> > getting close to 2GB, you might want to take steps to avoid this problem
> > before it happens to you.
> Then it's more urgent I have thought, id2entry.gdbm size is 2119467956 (30 MB
Well, if you're not sure which Berkeley DB version to use, you could try
dumping and reloading the database in GDBM as a quick fix (for the size,
not the indexing). I think I left out some steps in my earlier
1. stop ldap
2. slapcat > foo.ldif
3. mv /var/lib/ldap /var/lib/ldap.old
4. mkdir /var/lib/ldap
5. chmod 700 /var/lib/ldap
6. slapadd -c < foo.ldif
7. start ldap
> Thanks very much for the help,