Apache 2.4 LDAP lookup sllow

Solution 1:

I've had exactly the same problem on Fedora 33 with Apache 2.4 and I've solved it by adding:

LDAPConnectionTimeout 1

to the Apache global configuration: https://httpd.apache.org/docs/2.4/mod/mod_ldap.html

The above parameter sets LDAP connection timeout to 1 second.
I'm using LDAPS with TLS and I suspect that delay was caused by Apache trying to resolve names or verify Active Directory/DC non-qualified (self enrolled) certificate.