[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: ldap_search blocks after several hundred consequtive searches without ldap_result being called (ITS#2389)
On Thu, 20 Mar 2003, Howard Chu wrote:
> The client library does not use non-blocking sockets. If something gave you
> that impression, it was incorrect.
Sorry, when I traced through the code I saw a call to
ber_pvt_socket_set_nonblock to turn nonblocking operation on, but I missed
the second call to turn it off.
I thought that ldap_search would use nonblocking sockets to ensure it's
asynchronicity.
> First of all, I suggest you change your client to avoid this request pattern.
> We'll look into insuring the server doesn't lock up.
Yup, done that. I figured this wouldn't be easy to fix.
One question though, is it possible to query the state of the LDAP context
to determine if submitting a new search will block, or some kind of flags
I could pass to ldap_search or ldap_search_ext to indicate that the
function should not submit the search and return an error if it would
block.
More importantly, if we are requesting a very large data set in an search
(either many entries or entries with very large attributes), and the
search_result is bigger than the local network buffers, will ldap_result
possibly block waiting for all the data to come through from the server?
Thanks much - Rand