Most of the time I have seem this type of problem has been for one of two reasons:

1. Running searches against an un-indexed field
2. Database indexes have become corrupted

In the case of #1, I would make sure you are not searching on any fields that are not indexed. This will be very slow every time.

In the case of #2, there are a number of commands you can run to re-index the database. For this, I would take a look at the OpenLDAP documentation for more infomration on slapadd, slapcat, and slapindex.

Either alone or together, both conditions will allow for extremely slow searches. However, if both are resolved, they should be as fast as ever.

One last note: a final solution could be to completely re-build the database from scratch, using a backup of the LDAP data. This method is usually never preferred, however it's sometimes the only way to gain all the integrity of the database back.

Good Luck!

---hA||ta----
print map{$_.' '}grep{/\w+/}@{[reverse(qw{Perl Code})]} or die while ( 'trying' );

In reply to Re: Ldap Search Hangs. by wazzuteke
in thread Ldap Search Hangs. by jabirahmed

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.