org.apache.activemq.broker.region.Queue.doBrowse never returns

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

org.apache.activemq.broker.region.Queue.doBrowse never returns

matteor
Version: AMQ 5.9.0

I'm dealing with a strange behavior of org.apache.activemq.broker.region.Queue.expireMessages() of org.apache.activemq.broker.region.Queue.expireMessagesTask. Basically this task stops working after few minutes after broker bootup.
I tried to track down the source of the problem and I found out that the doBrowse method remains forever in the following while loop:
while (shouldPageInMoreForBrowse(max)) {
    pageInMessages(!memoryUsage.isFull(110));
};
I find this while quite strange. Besides, I checked in the doBrowse method in v. 5.8.0 and there is no trace of this while loop.

Any hints on this?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

gtully
hmm. that is the result of the fix for
https://issues.apache.org/jira/browse/AMQ-4930

the intent is to limit a browse or expire check to available memory or
max browse size.
I think the fix is in 5.9.1

As a workaround, disable periodic expiry checking.
policyEntry expireMessagesPeriod=0 and or configure a very small
maxBrowsePageSize and maxExpirePageSize

On 24 April 2014 16:21, matteor <[hidden email]> wrote:

> Version: AMQ 5.9.0
>
> I'm dealing with a strange behavior of
> org.apache.activemq.broker.region.Queue.expireMessages() of
> org.apache.activemq.broker.region.Queue.expireMessagesTask. Basically this
> task stops working after few minutes after broker bootup.
> I tried to track down the source of the problem and I found out that the
> doBrowse method remains forever in the following while loop:
>
> I find this while quite strange. Besides, I checked in the doBrowse method
> in v. 5.8.0 and there is no trace of this while loop.
>
> Any hints on this?
>
> Thanks!
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-region-Queue-doBrowse-never-returns-tp4680530.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://redhat.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

gtully
looks like the fix in not in 5.9.1
u need the workarounds or
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=commit;h=9c247160

On 24 April 2014 16:44, Gary Tully <[hidden email]> wrote:

> hmm. that is the result of the fix for
> https://issues.apache.org/jira/browse/AMQ-4930
>
> the intent is to limit a browse or expire check to available memory or
> max browse size.
> I think the fix is in 5.9.1
>
> As a workaround, disable periodic expiry checking.
> policyEntry expireMessagesPeriod=0 and or configure a very small
> maxBrowsePageSize and maxExpirePageSize
>
> On 24 April 2014 16:21, matteor <[hidden email]> wrote:
>> Version: AMQ 5.9.0
>>
>> I'm dealing with a strange behavior of
>> org.apache.activemq.broker.region.Queue.expireMessages() of
>> org.apache.activemq.broker.region.Queue.expireMessagesTask. Basically this
>> task stops working after few minutes after broker bootup.
>> I tried to track down the source of the problem and I found out that the
>> doBrowse method remains forever in the following while loop:
>>
>> I find this while quite strange. Besides, I checked in the doBrowse method
>> in v. 5.8.0 and there is no trace of this while loop.
>>
>> Any hints on this?
>>
>> Thanks!
>>
>>
>>
>> --
>> View this message in context: http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-region-Queue-doBrowse-never-returns-tp4680530.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>
> --
> http://redhat.com
> http://blog.garytully.com



--
http://redhat.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

matteor
In reply to this post by gtully
Hi! thanks for the response.

Actually I activated periodic expiry checking on purpose since we have massive message production and this is a way to tame the memory usage.

I'll try with the maxBrowsePageSize and maxExpirePageSize settings. Anyway, do you think this infinite while loop is the expected behavior for the doBrowse?

Many thanks!
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

gtully
it should not exceed the maxBrowsePageSize so any infinite loop is a
bug :-( and I think one of the unit tests showed that bug up in a non
standard env, just a little too late.

On 24 April 2014 17:03, matteor <[hidden email]> wrote:

> Hi! thanks for the response.
>
> Actually I activated periodic expiry checking on purpose since we have
> massive message production and this is a way to tame the memory usage.
>
> I'll try with the maxBrowsePageSize and maxExpirePageSize settings. Anyway,
> do you think this infinite while loop is the expected behavior for the
> doBrowse?
>
> Many thanks!
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-region-Queue-doBrowse-never-returns-tp4680530p4680535.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
http://redhat.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

matteor
I really appreciate your quick reply gary. Thanks.

So it seems to me that a possible solution would be trying to create a patch for this, right? Could I create an issue with a tentative patch?
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

gtully
Think u just need to apply the fix to your branch or build trunk. The fix
is
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=commit;h=9c247160
On 24 Apr 2014 17:29, "matteor" <[hidden email]> wrote:

> I really appreciate your quick reply gary. Thanks.
>
> So it seems to me that a possible solution would be trying to create a
> patch
> for this, right? Could I create an issue with a tentative patch?
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-region-Queue-doBrowse-never-returns-tp4680530p4680539.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

cyflhn
This post was updated on .
I have encountered this kind of infinite loop of doBrowse:
toPageIn: 0, Inflight: 263, pagedInMessages.size 263, pagedInPendingDispatch.size 0, enqueueCount: 1700826, dequeueCount: 1700556, memUsage:514431 toPageIn: 0, Inflight: 263, pagedInMessages.size 263, pagedInPendingDispatch.size 0, enqueueCount: 1700826, dequeueCount: 1700556, memUsage:514431
this is part of my log. pagedInMessages.size never increases and never exceeds the max, max=400, message.size nerver drops. can your patch fix it? what kind of reason is it?
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

Tim Bain
What version are you running?
On Feb 2, 2015 8:38 PM, "cyflhn" <[hidden email]> wrote:

> I have encountered this kind of infinite loop of doBrowse:toPageIn: 0,
> Inflight: 263, pagedInMessages.size 263, pagedInPendingDispatch.size 0,
> enqueueCount: 1700826, dequeueCount: 1700556, memUsage:514431toPageIn: 0,
> Inflight: 263, pagedInMessages.size 263, pagedInPendingDispatch.size 0,
> enqueueCount: 1700826, dequeueCount: 1700556, memUsage:514431this is part
> of
> my log. pagedInMessages.size never increases and never exceeds the max,
> max=400, message.size nerver drops. can your patch fix it? what kind of
> reason is it?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/org-apache-activemq-broker-region-Queue-doBrowse-never-returns-tp4680530p4690906.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.activemq.broker.region.Queue.doBrowse never returns

cyflhn
5.9.1
I eagerly want to know why pagedInMessages.size is less than message.size and pagedInMessages.size message.size never change.