failover ConnectionStateTracker can lead to OOM with TextMessages
-----------------------------------------------------------------

                 Key: AMQ-3352
                 URL: https://issues.apache.org/jira/browse/AMQ-3352
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 5.5.0
            Reporter: Gary Tully
            Assignee: Gary Tully


With a reasonable large textmessage, the connection state tracker, which keeps 
an LRU cache of messages for redelivery on failover, can grow. The problem is 
the use of message size, which is approximated before marshaling. The 
approximation is > the encoded size so the size increments on a track back are 
larger than the decrements on a track, which lease to growth in the number of 
messages cached and can lead to an OOM.

The fix appears to be to not cache a copy of the message, such that the 
increment when the message is evicted will reflect the decrement after 
marshaling. 

The change that exposed this issue is 
https://issues.apache.org/jira/browse/AMQ-2585 - without that change the state 
tracker capacity would shrink.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to