Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using openLDAP on a CENTOS server.

To test I use JMETER with LDAP query and my software using thoses entry.

I want to optimize a particular request, I heavily search an OU attribute : description. The search use the l attribute to find it :search filter l=username. If my index (in slapd.conf)is :

index ou,description,l           eq,pres,sub

Jmeter does not return the description field and my software does not allow me to log anymore.

If I remove this line from slapd.conf or if I use : `index ou,description eq,pres,sub i have the same average response time.

How can I optimize my perfs?
Why indexing l remove the attribute i want from the answer, and make my software unable to use my directory anymore?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Every time you add or remove an index you have to run slapindex and remember to keep the right permissions for database files. For example, on debian with OpenLDAP you have to:

/etc/init.d/slapd stop
chown openldap:openldap /var/lib/ldap/*
/etc/init.d/slapd start
share|improve this answer
If i run slapindex i have the following error : 'bdb(dc=ldapserver,dc=com): Lock table is out of available locks => bdb_idl_insert_key: c_put id failed: Cannot allocate memory (12) => bdb_tool_entry_reindex: txn_aborted! Accessing a corrupted shared library (80)' I do not have any openldap user. – Sylario Oct 5 '10 at 16:30
have you stopped slapd before running slapindex? As I mentioned, the openldap user is correct for debian, it may be different on different distributions. Add those errors to question, they don't look good to me, you may have damaged your database... – Hubert Kario Oct 5 '10 at 16:48
Ok, i am recreating a blank directory and using backup this time, thanks! – Sylario Oct 7 '10 at 13:50

I ended up doing this

sudo /etc/init.d/slapd stop

sudo -u insert-your-openldap-server-user-here -c slapindex -v

sudo /etc/init.d/slapd start

So on my debian box the user is openldap, which makes the command look like

sudo -u openldap slapindex -v -d 1

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.