Pb with ruby/ldap

Hi,

i have to make a search on a quite big ldap database.
I’m using the libldap library for Ruby (v0.8)

I make a search/search2 request on the databe but the result seem to big
too big and i get an error message:

···

$ ./get_email.rb < http.log
bind: Success
…/get_email.rb:14:in `search’: Size limit exceeded (LDAP::ResultError)

How can i deal with that ? How can i split the request in few shorters
one.

Regards.

Hi, Cedric. This is most likely not a problem specific to Ruby/LDAP.
Your LDAP server should have a search size parameter. The purpose of this
parameter is to avoid large, unindexed queries against the database. If
you have control over the LDAP server, one solution would be to index the
attributes that you are attempting to query against.

To verify that it isn’t specifically a Ruby/LDAP problem you could try the
same query using the ldapsearch command line tool.

Hope this helps.

Chad

···

On Fri, 11 Apr 2003, Cedric Foll wrote:

Hi,

i have to make a search on a quite big ldap database.
I’m using the libldap library for Ruby (v0.8)

I make a search/search2 request on the databe but the result seem to big
too big and i get an error message:

$ ./get_email.rb < http.log
bind: Success
…/get_email.rb:14:in `search’: Size limit exceeded (LDAP::ResultError)

How can i deal with that ? How can i split the request in few shorters
one.

Hi, Cedric. This is most likely not a problem specific to Ruby/LDAP.
Your LDAP server should have a search size parameter. The purpose of this
parameter is to avoid large, unindexed queries against the database. If
you have control over the LDAP server, one solution would be to index the
attributes that you are attempting to query against.

To verify that it isn’t specifically a Ruby/LDAP problem you could try the
same query using the ldapsearch command line tool.

Hope this helps.

Chad

I’m not sure the pb come from the server.

How can i modify the field “Size Limit” in the search request ?
I’ve analysed the request with ethereal and my ldap client (evolution)
send a “Size Limit: 100” and my script a “Size Limit: 0”

I do exactly the same searche request (exept the field “Size Limit”) with evolution and my script,
evolution get the answer and my script received a “Size limit exceeded”.

I’ve looked in the doc and examples of the library but without any
solution for this.