Uploaded image for project: 'LDAP Connector'
  1. LDAP Connector
  2. MGNLLDAP-59

Leak cause ConnectionFactory.connectionPropertyList entries are never removed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Neutral Neutral
    • None
    • 1.4.3
    • None
    • Linux, CAS, ActiveDirectory, Magnolia EE 4.4.5

      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.

        Acceptance criteria

              ochytil Ondrej Chytil
              fuchs.florian Florian Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: