Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 46999 invoked from network); 17 Mar 2009 13:22:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2009 13:22:07 -0000 Received: (qmail 65081 invoked by uid 500); 17 Mar 2009 13:22:05 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 65057 invoked by uid 500); 17 Mar 2009 13:22:05 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 65031 invoked by uid 99); 17 Mar 2009 13:22:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 06:22:05 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [61.9.189.137] (HELO nschwmtas01p.mx.bigpond.com) (61.9.189.137) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 13:21:55 +0000 Received: from nschwotgx02p.mx.bigpond.com ([144.137.0.213]) by nschwmtas01p.mx.bigpond.com with ESMTP id <20090317132131.LQCO412.nschwmtas01p.mx.bigpond.com@nschwotgx02p.mx.bigpond.com> for ; Tue, 17 Mar 2009 13:21:31 +0000 Received: from [192.168.2.5] (really [144.137.0.213]) by nschwotgx02p.mx.bigpond.com with ESMTP id <20090317132130.KWHY13147.nschwotgx02p.mx.bigpond.com@[192.168.2.5]> for ; Tue, 17 Mar 2009 13:21:30 +0000 Message-Id: From: Jim Alateras To: users@activemq.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Large number of messages in the queue Date: Wed, 18 Mar 2009 00:21:29 +1100 X-Mailer: Apple Mail (2.929.2) X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150203.49BFA3DA.009C,ss=1,fgs=0 X-Virus-Checked: Checked by ClamAV on apache.org I have around 60K messages in one of my queues that I want to process. The problem is that after around 10 minutes I get an OutOfMemoryError. I get a number of exceptions such as 2009-03-17 23:37:29,354 [VMTransport] ERROR - Failed to page in more queue messages java.lang.OutOfMemoryError: Java heap space or java.lang.OutOfMemoryError: Java heap space at java .lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java: 99) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java: 393) at java.lang.StringBuffer.append(StringBuffer.java:225) at java.io.StringWriter.write(StringWriter.java:90) at java.io.PrintWriter.write(PrintWriter.java:384) at java.io.PrintWriter.write(PrintWriter.java:401) at java.io.PrintWriter.print(PrintWriter.java:532) at java.io.PrintWriter.println(PrintWriter.java:669) at java.lang.Throwable.printStackTrace(Throwable.java:513) at org .apache .derby.iapi.services.context.ErrorStringBuilder.stackTrace(Unknown Source) at org .apache .derby.iapi.services.context.ContextManager.cleanupOnError(Unknown Source) at org .apache .derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org .apache .derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source) at org .apache .commons .dbcp .DelegatingPreparedStatement .executeQuery(DelegatingPreparedStatement.java:92) at org .apache .activemq .store .jdbc .adapter .DefaultJDBCAdapter.doRecoverNextMessages(DefaultJDBCAdapter.java:724) at org .apache .activemq .store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java: 214) at org .apache .activemq .store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:87) at org .apache .activemq .broker .region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java: 84) at org .apache .activemq .broker .region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java: 236) at org .apache .activemq .broker .region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java: 136) at org .apache .activemq .broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java: 131) at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:1252) at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java: 1391) at org.apache.activemq.broker.region.Queue.iterate(Queue.java:1075) at org .apache .activemq .thread.DeterministicTaskRunner.runTask(DeterministicTaskRunner.java:84) at org.apache.activemq.thread.DeterministicTaskRunner $1.run(DeterministicTaskRunner.java:41) at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:675) depending on my configuration. What is see is that the inflight count tends to always increase, which is consuming memory and was wondering under what circumstances it gets capped. Here is my broker configuration. Any advice would be much appreciated. cheers