You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Francesco Nigro (Jira)" <ji...@apache.org> on 2021/01/20 14:09:00 UTC
[jira] [Commented] (ARTEMIS-3021) OOM due to wrong CORE clustered
message memory estimation
[ https://issues.apache.org/jira/browse/ARTEMIS-3021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268587#comment-17268587 ]
Francesco Nigro commented on ARTEMIS-3021:
------------------------------------------
After an additional investigation, it seems that the wrong core estimation only happen if the message is being modified by adding routing information to it (with RemoteQueueBinding::addRouteContextToMessage).
Right after the message is going to be routed to the queue (getting a wrong evaluation of its memory footprint, because encoding is lazy) and right after is being encoded, if durable, getting an enlarged buffer, not accounted on the original memory estimation.
> OOM due to wrong CORE clustered message memory estimation
> ---------------------------------------------------------
>
> Key: ARTEMIS-3021
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3021
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Durable CORE messages with clustering can get their internal buffer enlarged by encodeHeadersAndProperties while being persisted on the journal, but the address size memory estimation using the estimated memory of a message is performed before that, making it less precise.
> This bad timing estimation, together with Netty ByteBuf auto-sizing mechanism can cause the broker to underestimate the message footprint, causing it to go OOM.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)