During a load test one day, we started getting the error “Too many open files” in our logs. Well, to be exact, we received a lot of errors that seemed unrelated, however, just before the spew of errors there was one slapd error that stated “Too many open files.” Turns out that each shell has a limited number of filehandles available to applications running within that session. To resolve it, we used the “ulimit” command within *NIX to increase the number of handles, and restarted slapd.
- Stopped LDAP (slapd)
- Executed “ulimit -a” to view current limit
- Executed “ulimit -n <number>” to increase the limit
- Restarted LDAP (slapd)
After doing that, our load tests ran smoothly.