The right solution is to not run out of file descriptors. Leaking them
is a very serious offense in the Unix world. This has to be fixed
before you can expect any stability from it. (The fact that it's
leaking memory to the tune of 300k per connection is also a
problem. You may find, though, that plugging the fd leak plugs the
memory leak.)
I have no familiarity with the slapd source, but it looks to me like
slapd might not be very careful about closing a file it opens during
the bind/unbind process. Read that code carefully, and add logging
statements to all places where new fd's appear and are destroyed. With
some patience, you should be able to find the FD leak.
-jeff
-- Jeff Allen <jeff@bunyip.com> | For information about Bunyip Bunyip Information Systems, Inc. | send e-mail to <info@bunyip.com>