Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7BD7B101B5 for ; Sat, 14 Dec 2013 07:38:10 +0000 (UTC) Received: (qmail 89287 invoked by uid 500); 14 Dec 2013 07:38:10 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 89093 invoked by uid 500); 14 Dec 2013 07:38:07 -0000 Mailing-List: contact commits-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 commits@activemq.apache.org Received: (qmail 88988 invoked by uid 99); 14 Dec 2013 07:38:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Dec 2013 07:38:07 +0000 Date: Sat, 14 Dec 2013 07:38:07 +0000 (UTC) From: "tiansong xia (JIRA)" To: commits@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (APLO-342) apollo becomes high heap memory after consuming large quantities of messages.what shall i do? 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/APLO-342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] tiansong xia updated APLO-342: ------------------------------ Description: The consumer consumes large quantities of messages by using transactional session,After a period of time, java heap memory is high. Consumer code like this: Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); MessageConsumer receiver = connection.createConsumer("test topic"); receiver.setMessageListener(new MessageListener() { //DB operations session.commit();}); apollo.xml: About 30 connections(one consumer per one connection) consume 500-600 message per second. GC infomation: num #instances #bytes class name ---------------------------------------------- 1: 623730 24949200 org.apache.activemq.apollo.openwire.command.MessageId 2: 311865 17464440 org.apache.activemq.apollo.openwire.command.MessageAck 3: 653593 15686232 org.apache.activemq.apollo.broker.Broker$PeriodStat 4: 624643 14991432 scala.collection.mutable.DefaultEntry 5: 76311 10419944 6: 76311 10389144 7: 312041 9985312 scala.collection.mutable.ListBuffer 8: 311865 9979680 org.apache.activemq.apollo.openwire.command.LocalTransactionId 9: 311865 9979680 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$TransactionContext 10: 7478 7530920 11: 312847 7508328 scala.collection.immutable.$colon$colon 12: 311865 7484760 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$$anonfun$on_message_ack$1 JVM configuration: -server -Xmx2G -Xms1G apollo.xml and gc logs can see attachments. was: The consumer consumes large quantities of messages by using transactional session,After a period of time, java heap memory is high. Consumer code like this: Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); MessageConsumer receiver = connection.createConsumer("test topic"); receiver.setMessageListener(new MessageListener() { //DB operations session.commit();}); apollo.xml: About 30 connections(one consumer per one connection) consume 500-600 message per second. GC infomation: num #instances #bytes class name ---------------------------------------------- 1: 623730 24949200 org.apache.activemq.apollo.openwire.command.MessageId 2: 311865 17464440 org.apache.activemq.apollo.openwire.command.MessageAck 3: 653593 15686232 org.apache.activemq.apollo.broker.Broker$PeriodStat 4: 624643 14991432 scala.collection.mutable.DefaultEntry 5: 76311 10419944 6: 76311 10389144 7: 312041 9985312 scala.collection.mutable.ListBuffer 8: 311865 9979680 org.apache.activemq.apollo.openwire.command.LocalTransactionId 9: 311865 9979680 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$TransactionContext 10: 7478 7530920 11: 312847 7508328 scala.collection.immutable.$colon$colon 12: 311865 7484760 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$$anonfun$on_message_ack$1 JVM configuration: -server -Xmx2G -Xms1G Configuration and gc logs can see attachments. > apollo becomes high heap memory after consuming large quantities of messages.what shall i do? > ----------------------------------------------------------------------------------------------- > > Key: APLO-342 > URL: https://issues.apache.org/jira/browse/APLO-342 > Project: ActiveMQ Apollo > Issue Type: Question > Components: apollo-broker, apollo-openwire > Affects Versions: 1.6 > Reporter: tiansong xia > Labels: test > Attachments: apollo.xml, gcloh.txt > > > The consumer consumes large quantities of messages by using transactional session,After a period of time, java heap memory is high. > Consumer code like this: > Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); > MessageConsumer receiver = connection.createConsumer("test topic"); > receiver.setMessageListener(new MessageListener() { > //DB operations > session.commit();}); > apollo.xml: > > > > About 30 connections(one consumer per one connection) consume 500-600 message per second. > GC infomation: > num #instances #bytes class name > ---------------------------------------------- > 1: 623730 24949200 org.apache.activemq.apollo.openwire.command.MessageId > 2: 311865 17464440 org.apache.activemq.apollo.openwire.command.MessageAck > 3: 653593 15686232 org.apache.activemq.apollo.broker.Broker$PeriodStat > 4: 624643 14991432 scala.collection.mutable.DefaultEntry > 5: 76311 10419944 > 6: 76311 10389144 > 7: 312041 9985312 scala.collection.mutable.ListBuffer > 8: 311865 9979680 org.apache.activemq.apollo.openwire.command.LocalTransactionId > 9: 311865 9979680 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$TransactionContext > 10: 7478 7530920 > 11: 312847 7508328 scala.collection.immutable.$colon$colon > 12: 311865 7484760 org.apache.activemq.apollo.openwire.OpenwireProtocolHandler$$anonfun$on_message_ack$1 > JVM configuration: > -server -Xmx2G -Xms1G > apollo.xml and gc logs can see attachments. -- This message was sent by Atlassian JIRA (v6.1.4#6159)