collective / collective/pas.plugins.ldap
Resource Exhaustion (too many open files)
- Dominant language
- Python
- Stars
- 13
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Server logs occasionally show errno 24, "Too many open files", under _moderate_ load with pas.plugins.ldap on:
- Plone 5.1.5
- pas.plugins.ldap 1.7.2
- python_ldap 3.2.0
- node.ext.ldap 1.0b10
End users say they "got kicked out of Plone" and "can't log back in for some time". The symptoms are that `lsof -p PID` (where PID is the Zope instance process ID) shows a steadily increasing number of TCP connections¹ to the LDAP server². The Zope instance log shows:
SERVER_DOWN: {u'info': 'Too many open files', 'errno': 24, 'desc': u"Can't contact LDAP server"}
There is a memcached running with Plone; telnet to its port and asking for stats shows it is indeed populated with info—although it seems like it's not _using_ that info given the rising number of LDAP client connections.
The problem occurs less frequently on:
- Plone 5.2.1
- pas.plugins.ldap 1.8.0
- python_ldap 3.2.0
- node.ext.ldap 1.0b12
The number of LDAP connections in this configuration continue to rise up to a point but they will suddenly plummet and seem to be reclaimed. Users don't report being "kicked out of Plone" as much.
The problem appears on unmodified Plone sites as well with no custom add-ons, testing by running 3 or 4 concurrent `curl --cookie __ac="…" http://localhost…/folder_contents`in loops.
This report is summarized from [this thread on the Plone community](https://community.plone.org/t/too-many-open-files-with-pas-plugins-ldap/12411). See the thread for additional details.
¹The problem appears with Unix local socket connections too.
²Appears with OpenLDAP `slapd` 2.4.50 and Apache Directory Service 2.0.0.AM24; Micro$oft AD not available for testing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.