[ 
https://issues.apache.org/jira/browse/AMQ-8509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17496723#comment-17496723
 ] 

ASF subversion and git services commented on AMQ-8509:
------------------------------------------------------

Commit d1e9ba68b3cbea3e9294cf4993d005c3c8ea86f2 in activemq's branch 
refs/heads/main from Artur Pedroso
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=d1e9ba6 ]

AMQ-8509: Fix TempUsage memory leak

If you have an application that creates lots of queues it will eventually
fail with OOM because TempUsage is started on Queue#start but never stopped.

The `systemUsage.getTempUsage().start()` used on the Queue#start
adds elements on a List from TempUsage parent and these elements
are never removed.

To reproduce this issue you need to leave an application
running for a long time creating different queues.

The only way to avoid the leak right now is to stop the BrokerService,
which isn't a solution.


> Queues do not stop TempStore Usage leading to a memory leak
> -----------------------------------------------------------
>
>                 Key: AMQ-8509
>                 URL: https://issues.apache.org/jira/browse/AMQ-8509
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.16.4
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Major
>             Fix For: 5.17.0, 5.16.5
>
>
> AMQ-7085 updated Queue.start() method to properly start the TempUsage 
> tracking just like StoreUsage and MemoryUsage but the stop() method doesn't 
> call stop on it so there is a memory leak when Queues are now stopped.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to