[
https://issues.apache.org/jira/browse/AMQ-4467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15814953#comment-15814953
]
Gary Tully commented on AMQ-4467:
---------------------------------
Thanks for the feedback @Christopher L], It can stop dispatch which is a little
worrying alright. The reasoning is more from the intent of the linked issue:
AMQ-4494, it there is no room for dispatch (due to bad configuration) then
rather than OOM the vm, the limits are enforced and some in-memory messages
need to be consumed before more can be paged in.
To have a better solution in this scenario - having a mechanism to purge the
cache for inactive destinations would be needed. I guess gcInactiveDestinations
would do it with a variant that just purged the cursor rather than deleted the
messages.
Peek at the additional test - it failed due to not being able to page in at 50%
( its high water mark) of the system limit. Now it will fail at 100% of the
shared limit.
Note: hasSpace is queried by the cursor prior to pageIn:
https://github.com/apache/activemq/blob/activemq-5.14.3/activemq-broker/src/main/java/org/apache/activemq/broker/region/cursors/QueueStorePrefetch.java#L118
Topics use only the shared limit to gate pageIn for subscriptions.
> Memory usage percent can be exceeded much if PFC is disabled
> ------------------------------------------------------------
>
> Key: AMQ-4467
> URL: https://issues.apache.org/jira/browse/AMQ-4467
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.x
> Reporter: SuoNayi
> Assignee: Gary Tully
> Fix For: 5.15.0
>
> Attachments: AMQ-4467.patch
>
>
> If PFC is disabled, when the store cursor checks limits, it checks only the
> memory percentage of its own MemoryUsage and compares it to the high water
> mark. Otherwise if PFC is enabled, it checks whether the MemoryUsage is
> "full" but the "isFull" method also checks its parents.
> This issue arrises when you have memory limits set on queues higher than the
> overall system limit, as well as if you have multiple queues who's memory
> limits combined are higher than the overall system limit. These settings must
> be taken into account.
> The original form can be found at
> http://activemq.2283324.n4.nabble.com/What-can-be-reason-of-460-memory-usage-limit-td4665651.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)