If you’re writing code that uses Apache Directory Server (a free, open source LDAP server), you may get the error “service unavailable” frequently. Apparently, there’s an issue with making 2 consecutive calls quickly to the ApacheDS server. If you put a delay of about 1/2 second between calls, this will usually work around the problem.
ApacheDS does not appear to be capable of handling rapid requests to it.