I've been doing some testing using OpenLDAP with BDB on a couple of different
platforms. I noticed a similar situation. When I sit in a loop doing adds,
at the 65,536th added entry the process stalls for a short period of time.
After a minute or two, the add succeeds. My first thought is that this is a
BDB issue, so I posted this question to Oracle's BDB forum. But I have yet to
receive any answer.
This situation seems to happen when I have around 43 10MB log files. During
the stall, I notice many log files are being written (another 25 or so), which
is a much quicker rate than was being written prior to the stall.
The stall only happens once. I added another 350,000 entries and no more
stalls. I ran a few other tests. Added 65,535 entries. All is fine. As
soon as the next entry is add, even if I recycle the server, I hit the
condition. I even tried deleting 1,000 entries. I would then need to add
1,0001 to get to 65,536 entries in the database and then hit the delay.