[Date Prev][Date Next]
Re: slapd problems under stress
I have integrated two backends into slapd and we are now
observing problems with slapd if it got under stress:
Our test program (written by using libldap) starts 80 async
request and waits for their results. This is done every
10 seconds. In case of a time-out (10 seconds) all pending
operations will be abandoned. Sometimes the slapd crashes
with a SEGV, sometimes it hangs, sometimes it aborts (from
assert() during a memory allocation)!
Can you send the source for the test program? Does the problem
happen after replying to a bunch of search requests, or does it
happen as soon as you start the test program? Do the three cases
(SEGV, hang, abort) happen with equal likelihood, or is one case more
likely than the others?
After that, we concentrated on a single backend which I
stripped down so that the search does nothing but a
The next step was to use the 'standard' ldbm backend.
And again: we have the same problems!
We are running linux 2.2.14, OpenLDAP 2.0-devel (last
update from the CVS: 28 June 2000), debug level for all
tests was 255.
Can you try a test? In libraries/libldap_r/tpool.c, add the
following line after line 161:
return ldap_pvt_thread_create( &thr, 1, start_routine, arg );
Then rebuild and try running your tests and see if the problems still happen.
I think that the problems are thread related.
Are there any known problems? Is it possible to set a limit
on the number of concurrent threads?
You can change line 97 in servers/slapd/init.c to something like:
ldap_pvt_thread_pool_init(&connection_pool, 5, 0);
where the second parameter is the maximum number of concurrent threads.