We have been using 389-ds as part of FreeIPA. In one of our environments, we have 2 389-ds installations with replication. 

Randomly, the 389-ds on either of them completely freezes and there are high number of CLOSE_WAITs on tcp/389 port. 

Only way to recover from this situation is to either reboot or "kill -9" the ns-slapd process. Graceful restarts get stuck indefinitely. 

One curious thing when this happens, a search using "ldapsearch" command seems to work but a search using a python-ldap client does not. FreeIPA does not work either. 

Any pointers on troubleshooting this would be appreciated.