[MGNLLDAP-59] Leak cause ConnectionFactory.connectionPropertyList entries are never removed Created: 19/Jan/12 Updated: 27/Mar/13 Resolved: 27/Mar/13 |
|
| Status: | Closed |
| Project: | LDAP Connector |
| Component/s: | None |
| Affects Version/s: | 1.4.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Florian Fuchs | Assignee: | Ondrej Chytil |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux, CAS, ActiveDirectory, Magnolia EE 4.4.5 |
||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Description |
|
LDAPAuthenticationModule.getConnectionName() generates a new connectionName on every call. This connectionName is used as a key in the Hashtable ConnectionFactory.connectionPropertyList the values are the properties of the LDAP connection. (Which stays the same at all time, in my scenario - it is the connection to the ActiveDirectory) As connectionName is always unique on each call, the Hashtable grows with each call to LDAPAuthenticationModule#validateUser() by at least one entry. In my scenario, we have the public system protected by CAS and ActiveDirectory. validateUser() (calls getConnectionName()/ConnectionFactory.getProperties() internally) gets called on each new session, so after about 600k sessions, our server goes away with a Out-of-memory Error. (2 Gig Heap space) My workaround is to return a fix key in a subclass of LDAPAuthenticationModule/ADAuthenticationModule. |