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

Jaroslav Sedlacek updated AMQ-5663:
-----------------------------------
    Description: 
Memory leak in persistent message batching 
(Queue.messages.persistent.batchList) caused by inconsistent "cacheEnabled" 
flag handling.

When AMQ is started and queue has more messages then 
maxPageSize/maxExpirePageSize/maxBrowsePageSize, then cacheEnabled flag stays 
"false" and no additional message is stored in batchList.
If queue has less messages than that, cacheEnabled is set to "true" and it is 
set to false only when AMQ has no more space (see 
AbstractPendingMessageCursor.hasSpace() - by default 70% of heap). It means 
batchList can grow significantly in this case.

This behaviour was noticed on DLQ kind of queue with no consumer when a big 
bunch of messages was added and it caused OOM.


  was:
Memory leak in peristent message batching (Queue.massages.persistent.batchList) 
caused by inconsistent "cacheEnabled" flag handling.

When AMQ is started and queue has more messages then 
maxPageSize/maxExpirePageSize/maxBrowsePageSize, then cacheEnabled flag stays 
"false" and no additional message is stored in batchList.
If queue has less messages than that, cacheEnabled is set to "true" and it is 
set to true only when AMQ has no more space (see 
AbstractPendingMessageCursor.hasSpace() - by default 70% of heap). It means 
batchList can grow significantly in this case.

This behaviour was noticed on DLQ kind of queue with no consumer when a big 
bunch of messages was added and it caused OOM.



> Memory leak in message batching
> -------------------------------
>
>                 Key: AMQ-5663
>                 URL: https://issues.apache.org/jira/browse/AMQ-5663
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.10.0
>            Reporter: Jaroslav Sedlacek
>
> Memory leak in persistent message batching 
> (Queue.messages.persistent.batchList) caused by inconsistent "cacheEnabled" 
> flag handling.
> When AMQ is started and queue has more messages then 
> maxPageSize/maxExpirePageSize/maxBrowsePageSize, then cacheEnabled flag stays 
> "false" and no additional message is stored in batchList.
> If queue has less messages than that, cacheEnabled is set to "true" and it is 
> set to false only when AMQ has no more space (see 
> AbstractPendingMessageCursor.hasSpace() - by default 70% of heap). It means 
> batchList can grow significantly in this case.
> This behaviour was noticed on DLQ kind of queue with no consumer when a big 
> bunch of messages was added and it caused OOM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to