[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Slow response from ldap_bind function
Hi:
I have a LDAP server running in a RedHat Linux 7.3 machine. The OpenLDAP
version is the
one that is shipped with RH7.3 (2.0.23). I'm using the default installation
of the
packages ... /etc/openldap ...
I added some test entries to the database using a directory tree like this:
c=US
|
o=MyOrganization
/ \
o=location1 o=location2
/ \ / \
ou=Engineering ou=Admin ou=Engineering ou=Admin
| | | |
cn=Person1 cn=Person2 cn=Person3 cn=Person4
cn=Person5 cn=Person6 cn=Person7 cn=Person8
cn=Person9.. cn=Person10.. cn=Person11.. cn=Person12..
Then I started developing a client using the C SDK under Linux 7.3
I'm using ldap_init to initialize the library, ldap_bind_s
to bind to the ldap server and ldap_unbind to close the connection.
When I run my program, the ldap_bind function takes around 10 seconds
to return. I'm using as "who" the root (cn=root,o=MyOrganization,c=US),
the credential is the default root password "secret" and the method
is LDAP_AUTH_SIMPLE. I went a step further, adding searching capabilities
to the client after the bind. I found out that after the binding delay,
the searching response is very fast.
I developed the same client sample using the Microsoft LDAP Win32
libraries (under Win2K) and the response is instantaneous. I'm using the
same parameters for the ldap_bind functions in both clients. I also tried
using a directory from Netscape browser and again the response is
instantaneous in both Linux and Windows even displaying all the Persons
in the database.
I tried PHP through Apache under Linux 7.3 and the binding slowed down
again.
When I tried to run the client program from the LDAP server using
"localhost"
then the response is comparable (instantaneous) to the client in Windows or
Netscape.
SUMMARY
-Fast response from Win32 program (Win2K)
-Fast response from Netscape Directory (Win2K & Linux)
-Fast response through URL format of LDAP (ldap://host:port.....) (Win2K &
Linux)
-Fast response from the C program under the LDAP server locally (Linux).
-Slow response from the Linux client using C or PHP using libraries from
RedHat 7.3
I need help on this...
Any suggestion...???
Thanks in Advance
Alberto Martin