I had a problem with OpenLDAP this week after I accidentally did a 'hard boot' of my laptop. I fiddled around with it for a while and did some research on the web, then I finally a reference to 'error 21'. This was an error code that indicates the OpenLDAP database has become corrupted. Thankfully, OpenLDAP ships with a database recovery tool.
The webpage I found appears to have been written by me! It is from an archived section of OTN and no longer has the usernames associated with the posts. Funny, if you post enough information on the internet long enough, you start to get your own answers back from Google.. I did think about the OpenLDAP corrupt database issue when I had my issue this week but didn't try that fix first. The reason is that I have not had much of a problem with OpenLDAP in 11.1.1 although it seems that OpenLDAP corruption was a weekly thing for me with 9.3.1.
In any case, to correct the problem, I created a cmd script to run the db_recovery tool:
set OPENLDAP_DIR=C:\Hyperion\products\Foundation\openLDAP %OPENLDAP_DIR%\bdb\bin\db_recover -v -h %OPENLDAP_DIR%\var\openldap-data -t 04101200
I ran this script and was back running in minutes. In my case, I ran this on my development laptop. If you are running a production environment, at a minimum, I would recommend backing up the OpenLDAP directories before you start so you can restore the files if there are any errors.