You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "David Sitsky (JIRA)" <ji...@apache.org> on 2019/01/17 03:53:00 UTC

[jira] [Commented] (AMQ-7085) Queue.start() does not call systemUsage.start() so TempStore usage is not handled correctly

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

David Sitsky commented on AMQ-7085:
-----------------------------------

Hi - what else is required to get this committed?  I submitted a patch with a test case almost two months ago.


> Queue.start() does not call systemUsage.start() so TempStore usage is not handled correctly
> -------------------------------------------------------------------------------------------
>
>                 Key: AMQ-7085
>                 URL: https://issues.apache.org/jira/browse/AMQ-7085
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.15.6
>            Reporter: David Sitsky
>            Priority: Major
>         Attachments: AQM-7085.patch
>
>
> I have an application using ActiveMQ and have a situation where a producer is blocked with this log message due to the temp usage limit being hit:
> {noformat}
> [ActiveMQ Transport: tcp:///aaa.bbb.ccc.ddd:65119@64759] 82567721 INFO  org.apache.activemq.broker.region.Queue - Usage(Main:temp:queue://aaabbb:temp) percentUsage=99%, usage=61771109932, limit=61771104256, percentUsageMinDelta=1%;Parent:Usage(Main:temp) percentUsage=100%, usage=61771109932, limit=61771104256, percentUsageMinDelta=1%: Temp Store is Full (99% of 61771104256). Stopping producer (ID:aaaaa-3:1:1:1) to prevent flooding queue://aaabbb. See http://activemq.apache.org/producer-flow-control.html for more info (blocking for: 8512s){noformat}
> In the past I have been able to use JConsole and update the broker's TempLimit value to a higher value to allow things to continue.
>  
> However on this occasion, the messages above when output again show that the parent's temp limit has updated however the child's limit (the queue) is unchanged.  So it seems the broker's TempUsage does not know about the queue's TempUsage. 
>  
> In looking at the code.. it seems a child Usage class has to call start() in order for this parent -> children link to be established and for parent limit changes to be propagated down to children.  However the Queue start() method doesn't call systemUsage.getTempUsage().start() for some reason (or even just systemUsage.start()).
>  
> Is this a bug?
>  
> DestinationView sadly does not expose setTempLimit() either so this wasn't an option either.
>  
> From Queue:
> {code:java}
>     @Override
>     public void start() throws Exception {
>         if (started.compareAndSet(false, true)) {
>             if (memoryUsage != null) {
>                 memoryUsage.start();
>             }
>             if (systemUsage.getStoreUsage() != null) {
>                 systemUsage.getStoreUsage().start();
>             }
>             systemUsage.getMemoryUsage().addUsageListener(this);
>             messages.start();
>             if (getExpireMessagesPeriod() > 0) {
>                 scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod());
>             }
>             doPageIn(false);
>         }
>     }{code}
>    



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)