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

Re: ldapsearch: erratic "Time limit exceeded" errors



Hi Dave

Thanks for the guess!

> At a guess you haven't built any indexes for (at least) sn and uid.

But:

blommie # cat /etc/openldap/slapd.conf | grep "database\|index"
# ldbm database definitions
database        ldbm
index           cn,sn,uid,o   pres,eq,sub
database        ldbm
index           cn,sn,uid,o   pres,eq,sub

And why would it sometimes work and sometimes not? I'm also accessing
LDAP via python-ldap, and this seems to work consistently. It's
ldapsearch that's behaving strangely, and this bugs me because I turn
to it for testing/debugging.

To make sure I ran slapindex, and saw the same
=> key_change(ADD,874)
<= key_change 0
messages whizzing by as I saw during slapadd. And there's no change
in behaviour:

"""
[...]
ldbm flushing db (sn.dbb) # <- sn is being indexed, right?
ldbm closing db (sn.dbb)
[...]
ldbm closing db (uid.dbb)
ldbm backend done syncing
====> cache_release_all
slapindex shutdown: freeing system resources.
blommie # ldapsearch -x -b "dc=upfrontsystems,dc=co,dc=za" '(sn=*Courtois*)'
version: 2


#
# filter: (sn=*Courtois*)
# requesting: ALL
#

# search result
search: 2
result: 3 Time limit exceeded

# numResponses: 1
blommie # /etc/init.d/slapd restart
* Stopping ldap-server... [ ok ]
* Starting ldap-server... [ ok ]
blommie # ldapsearch -x -b "dc=upfrontsystems,dc=co,dc=za" '(sn=*Courtois*)'
[... time limit exceeded ...]
blommie # ldapsearch -x -b "dc=upfrontsystems,dc=co,dc=za" '(sn=*Courtois*)'
version: 2


#
# filter: (sn=*Courtois*)
# requesting: ALL
#

# ContactPerson_315, Customer_160, creme, upfrontsystems, co, za
dn: oid=ContactPerson_315,oid=Customer_160,dc=creme,dc=upfrontsystems,dc=co,dc
=za
givenName: Pierre Courtois
mail: F5BJR@wanadoo.fr
postalCode: 02100
registrationKey: regkey
sn: Courtois
[... succeeded ...]
"""


--
Jean Jordaan
http://www.upfrontsystems.co.za