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

ldap_result error

Hi all,

I have one process that needs to communicate with two different LDAP servers.
For this reason, the process creates two threads (each thread manages the connection with one server).

For tests, the process launch several "search" requests for the two threads at a fixed rate (about 100 searches/s). 
Each thread polls the server responses using the API "ldap_result" in asynchronous mod using

In this scenario, the "ldap_result" system call of one thread
return with error (-1) and the error is "Can't contact the LDAP server". 

I tried to launch one single thread and it works fine (the maximum measured
rate  is 800 searches/s). Also I launch the two threads alternating
the search requestes (so that only one of them is running) and it works fine.

It seems that the error happens only if the two process runs
simultaneously. Thinking of a race condition error, I lead the same tests using the libldap_r library 
to build the process but the error still remains.

Have anyone encountered a similar error?

The used openldap version is 2.3.27 both for LDAP servers ("slapd") and the libraries.

Thanks in advance for the reply.