Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3352

failover ConnectionStateTracker can lead to OOM with TextMessages

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Activity

          People

            gtully Gary Tully
            gtully Gary Tully
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: