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

Re: Retrieving more results after LDAP_SIZELIMIT_EXCEEDED

Jiang, David wrote:

We are trying to optimize the performance of our slapd server and client. During the course of profiling, we noticed that changing the sizelimit parameter in the slapd.conf file increases the performance considerably on the server. However, this results in receiving an error code of LDAP_SIZELIMIT_EXCEEDED when a query returns more results than the sizelimit. Is it possible to retrieve more results after receiving an LDAP_SIZELIMIT_EXCEEDED? We have yet to find sample code that does this. Or would it be better to keep a higher sizelimit parameter in the slapd.conf file but specify a sizelimit of 1 as a parameter to ldap_search_s when it is known that only 1 entry should be returned? Thanks,

Changing the sizelimit definitely reduces server load provided the limit is hit by those queries that return more than sizelimit results, this is plain obvious. The drawback is that those queries actually do not receive all the results they expected, and this is plain obvious as well. If you use latest 2.2 you can:
1) set different sizelimits for different users/groups, so that those who are authorized can have higher (even unlimited) size limits, and those who are not have lower (even search disabled) size limits (note that disabling search has nearly the same effect as protecting behind ACLs, from a client's perspective; but from a server's perspective it saves the need to search the database and test filter and ACLs). You can also use paged results control (available with bdb in latest 2.2) to set, say, a sizelimit for plain searches but no limits on the total size of a paged results search.
Setting a sizelimit of 1 on searches that exactly return 1 entry has no effects on performances.


   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497