1. Mahlon E. Smith
  2. shelldap
  3. Issues

Issues

Issue #18 resolved

Sizelimit exceeded

ewilts
created an issue

When using shelldap against an LDAP environment with many objects, the Sizelimit exceeded error is returned.

[11:40 ewilts@csi10 shelldap] > ./shelldap --version
shelldap 1.3.2
[11:41 ewilts@csi10 shelldap] > ./shelldap
Bind password:
~ > cd ou=People
Sizelimit exceeded

I believe that the limit is 1,000. Sample code on how to fix this is in https://stackoverflow.com/questions/5830860/increase-limit-from-1000

Comments (6)

  1. Mahlon E. Smith repo owner

    If you're using OpenLDAP, the default is 500, and can be altered with the sizelimit setting (or set to unlimited) -- if you have access to the slapd.conf and want a quick interim fix.

    I do like the idea of performing paginated batches for servers with low sizelimit settings rather than propagating a server error, though -- maybe exposing the batch fetch size as a config option, which if enabled, checks for presence of the server control, and alters the search to use a cookie?

  2. ewilts reporter

    That solution should work. We've already bumped our sizelimit but with the continuous growth, upping it again isn't the long-term answer.

  3. Mahlon E. Smith repo owner

    Can you try out the attached patch, and let me know how it works for you? It seemingly does the right thing in my environment, anyway.

    $ ./shelldap 
    ~ > cd ou=People 
    Sizelimit exceeded
    ~ >
    
    $ ./shelldap --paginate 100
    ~ > cd ou=People 
    ou=People ~ > ls -l
    uid=[...]
    
    1807 objects.
    ou=People ~ >
    

    I didn't realize that the Pager control inherits sizelimit settings from the global config. I had to add a separate (per-database) config for it to allow paging to bypass the default:

    limits * size.prtotal=unlimited 
    

    (or whatever the cn=config equivalent is.)

    See section 9.4.4. of http://www.openldap.org/doc/admin24/limits.html .

  4. Log in to comment