[ 
https://issues.apache.org/jira/browse/ARTEMIS-4192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram updated ARTEMIS-4192:
------------------------------------
    Description: 
Steps to reproduce:
 # Create a broker from default settings
 # Add the following to {{broker.xml}} to enable paging for the TEST queue.
{code:xml}
<address-setting match="TEST">
  <max-size-messages>25000</max-size-messages>
</address-setting>{code}

 # Use {{artemis producer}} to dump 2 million messages into the TEST queue
{noformat}
./bin/artemis producer --message-count 20000 --threads 100{noformat}

 # Call {{removeAllMessages}} using the console or via Jolokia:
{noformat}
curl -sH "Origin: http://localhost:8161"; -u admin:admin 
'[http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=!%220.0.0.0!%22,component=addresses,address=!%22TEST!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22TEST!%22/removeAllMessages()']{noformat}

The broker will start producing Java Heap space errors and shutdown.

I managed to take a heap dump and I noticed there are quite a few Artemis 
classes with an instance count of around one million, and then several more 
around 20,000. I included the latter because messages seem to be bundled into 
transactions of 500.

!image-2023-03-03-00-09-50-092.png!

  was:
Steps to reproduce:
 # Create a broker from default settings
 # Add the following to {{broker.xml}} to enable paging for the TEST queue.
{code:xml}
<address-setting match="TEST">
  <max-size-messages>25000</max-size-messages>
</address-setting>{code}

 # Use {{artemis producer}} to dump 2 million messages into the TEST queue
{noformat}
./bin/artemis producer --message-count 2000000 --threads 100{noformat}

 # Call {{removeAllMessages}} using the console or via Jolokia:
{noformat}
curl -sH "Origin: http://localhost:8161"; -u admin:admin 
'[http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=!%220.0.0.0!%22,component=addresses,address=!%22TEST!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22TEST!%22/removeAllMessages()']{noformat}

The broker will start producing Java Heap space errors and shutdown.

I managed to take a heap dump and I noticed there are quite a few Artemis 
classes with an instance count of around one million, and then several more 
around 20,000. I included the latter because messages seem to be bundled into 
transactions of 500.

!image-2023-03-03-00-09-50-092.png!


> Calling removeAllMessages for a large paged queue causes OOM situation
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-4192
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4192
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.27.0, 2.28.0
>            Reporter: Dries Harnie
>            Priority: Major
>         Attachments: image-2023-03-03-00-09-50-092.png
>
>
> Steps to reproduce:
>  # Create a broker from default settings
>  # Add the following to {{broker.xml}} to enable paging for the TEST queue.
> {code:xml}
> <address-setting match="TEST">
>   <max-size-messages>25000</max-size-messages>
> </address-setting>{code}
>  # Use {{artemis producer}} to dump 2 million messages into the TEST queue
> {noformat}
> ./bin/artemis producer --message-count 20000 --threads 100{noformat}
>  # Call {{removeAllMessages}} using the console or via Jolokia:
> {noformat}
> curl -sH "Origin: http://localhost:8161"; -u admin:admin 
> '[http://localhost:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=!%220.0.0.0!%22,component=addresses,address=!%22TEST!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22TEST!%22/removeAllMessages()']{noformat}
> The broker will start producing Java Heap space errors and shutdown.
> I managed to take a heap dump and I noticed there are quite a few Artemis 
> classes with an instance count of around one million, and then several more 
> around 20,000. I included the latter because messages seem to be bundled into 
> transactions of 500.
> !image-2023-03-03-00-09-50-092.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to