Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28C7BC2E8 for ; Thu, 8 Jan 2015 15:45:34 +0000 (UTC) Received: (qmail 40677 invoked by uid 500); 8 Jan 2015 15:45:35 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 40608 invoked by uid 500); 8 Jan 2015 15:45:35 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 40596 invoked by uid 99); 8 Jan 2015 15:45:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 15:45:35 +0000 Date: Thu, 8 Jan 2015 15:45:35 +0000 (UTC) From: "Jaewoong Choi (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-4666) Topic persistent message publishing is blocked by hitting 100% of per-destination memory limit if there's any durable subscriber connected but not consuming. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269459#comment-14269459 ] Jaewoong Choi commented on AMQ-4666: ------------------------------------ Have you read the problem description section at #4 in my original request? In short, why would all "persistent" message publishing are blocked by topic's shared memory limit which is only for non-persistent messages, unnecessarily?? That's the problem. > Topic persistent message publishing is blocked by hitting 100% of per-destination memory limit if there's any durable subscriber connected but not consuming. > ------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: AMQ-4666 > URL: https://issues.apache.org/jira/browse/AMQ-4666 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.7.0 > Reporter: Jaewoong Choi > Attachments: MemoryLimitTest.java > > > Failing scenario: > 1. Embedded broker starts with the following configurations: > - persistent = true, > - systemUsage.memoryUsage.limit = 10*1024*1024 // 10mb broker main memory limit > - destinationPolicy.policyEntry.memoryLimit = 1*1024*1024 // 1mb per-destination memory limit > 2. Create a topic durable subscription with prefetchLimit=0. > 3. Create a topic publisher and publish persistent 400kb messages. > 4. (Problem) After publishing 3 messages successfully, PFC kicks in and the above topic publisher gets blocked its publishing. > At step #4, the expectation is not seeing any publisher blocking for the persistent message publishing until the store limit is reached. How come the persistent message publishing is limited by 100% memory full? > Per the code inspection, this is because the store cursor of the topic durable subscriber (i.e. TopicStorePrefetch) is working with the main broker's memory limit, not with the per-destination memory limit. Hence, it keeps increasing broker main memory usage over the per-destination memory limit and after it reached 100% of per-destination limit, PFC kicked in. > I verified that the above scenario went through well if I fix the store cursor to use/refer-to the per-destination memory usage along with its pending list (cache) management. -- This message was sent by Atlassian JIRA (v6.3.4#6332)