• Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3.0
    • Component/s: JMS client
    • Labels:
    • Environment:

      Ran on ActiveMQ 4.1.1 but ActiveMQ 5.0's code is the same


      I think it is a memory leak that calling close() on a org.apache.activemq.ra.ManagedSessionProxy does not remove it from the session list of the org.apache.activemq.ra.ManagedConnectionProxy that created it. Some programs (like mine) run on a Jboss bean thats generating messages every few seconds and I like to keep a Connection open to ActiveMQ and create a new session for each new batch of messages. When I close these sessions (which are really ManagedSessionProxy's), the actual ActiveMQSession wrapped inside closes but a lot of its data remains referenced inside it. Also, the reference to the ManagedSessionProxy stays in the ManagedConnectionProxy's session list. So since the ManagedSessionProxy has to stay in the ManagedConnectionproxy's session list, it stays in memory and so does the ActiveMQSession, and so all these sessions (thousands of them) stay in memory until the ManagedConnectionProxy is closed which my program only calls when the server shuts down.

      To generate this, create a simple message producing program that uses the resource adaptor's ActiveMQConnectionFactory to generate one connection. Then run a loop that creates a session on that connection, sends a message or two, and closes the session. May need to run this loop at least 100 times appreciate what I'm saying and how quickly it affects things.

      I think this will be a simple fix and hopefully will be resolved soon.

        Issue Links


          Jeff Turner made changes -
          Project Import Fri Nov 26 22:32:02 EST 2010 [ 1290828722158 ]
          Bruce Snyder made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s AGING_TO_DIE [ 12187 ]
          Fix Version/s 5.3.0 [ 11914 ]
          Bruce Snyder made changes -
          Link This issue duplicates AMQ-2166 [ AMQ-2166 ]
          Bruce Snyder made changes -
          Fix Version/s 5.4.0 [ 12110 ]
          Fix Version/s AGING_TO_DIE [ 12187 ]
          Gary Tully made changes -
          Fix Version/s 5.3.0 [ 11914 ]
          Fix Version/s 5.4.0 [ 12110 ]
          Ivan Koblik made changes -
          Attachment mem-histo.2008.10.03.txt [ 17047 ]
          Rob Davies made changes -
          Field Original Value New Value
          Fix Version/s 5.3.0 [ 11914 ]
          Steven Buberl created issue -


            • Assignee:
              Steven Buberl
            • Votes:
              13 Vote for this issue
              8 Start watching this issue


              • Created: