Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-644

Memory Leak in Persistent search ?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.0-RC3, 1.5.4
    • 1.5.5
    • core
    • None

    Description

      After having profiled memory, it seems we have a memory leak in SessionRegistry.

      A little test (attached) does a search N times for N threads, and for each search, a OutstandingRequest is attached to the session. After a few thousands of search we fall in OOM. I've put some trace in those methods :
      SessionRegistry.addOutstandingRequest
      and
      SessionRegistry.removeOutstandingRequest

      Session Released
      addOutstandingRequest 2
      addOutstandingRequest 3
      addOutstandingRequest 4
      ... ( 100 requests)
      addOutstandingRequest 99
      addOutstandingRequest 100
      addOutstandingRequest 101
      remove session

      The SessionRegistry.removeOutstandingRequest is never called, except if an exception is raised (NamingException).

      It may be on purpose ( persistent search), but we can't assume the server will be able to hold as many OutstandingRequest as we have search requests - or entries -.

      Attachments

        1. SearchTest.java
          3 kB
          Emmanuel Lécharny

        Activity

          People

            elecharny Emmanuel Lécharny
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: