Qpid
  1. Qpid
  2. QPID-3157

'removed' subscriptions may be held in memory by the queues SubscriptionList or 'lastSubscriptionNode' reference

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12
    • Fix Version/s: 0.13
    • Component/s: Java Broker
    • Labels:
      None

      Description

      subscriptions 'removed' from a queue subscription list are only marked deleted and can not actually bereleased from memory until the head of the subscription list advances beyond them. Additionally and perhaps more troublesome, a queues 'lastSubscriptionNode' can refer to a particular subscription but hold all subscequent subscriptions in memory whether they have been deleted or not and regardless whether the head of the SubscriptionList has advanced beyond them,

      As a result any memory in use by the now-closed subscription will not be released until the queue is deleted, or all the subscriptions prior to it are closed and removed from the list and the 'lastSubscriptionNode' advances beyond them.. This also holds the associated ServerSession in memory, which is currently a rather heavyweight object.

      This issue is further compounded when the queue has a backlog of messages and consumers are then created, used to recieve one message, and closed. In this scenario the broker sends the client as many messages as it can prefetch, leading to creation of up to <prefetch size, default=500> MessageTransfer commands, all which are recorded in the ServerSession but then left retained as 'unprocessed' in the closed session, which might be held in memory as described above. This results in an explosion in the number of MessageTransfer commands retained in memory as each message can have up to <prefetch size> MessageTransfer commands associated with it before it is eventually consumed by a client and all of thse will also be retained in memory by a 'removed' but not deleted subscription. The last effect can be combated by restricting the preftech size (eg appending &maxprefetch='1' to the connection url).

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Keith Wall
              Reporter:
              Robbie Gemmell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development