1 Reply Latest reply on May 21, 2009 6:19 AM by Ulhas Bhole

    OME with slow consumers

    Jim Alateras Newbie

      I am getting an OME when I run activemq and there are lots of messages in the queues. I have tried setting the SystemUsage to limit the amount of memory that the broker uses but have not been successful. I am using the KahaPersisteneAdaptor with activemq 5.3.01

       

      Here is the exception and below is the broker configuration. Any help would be appreciated

       

      java.lang.OutOfMemoryError: Java heap space

           at sun.reflect.ByteVectorImpl.trim(ByteVectorImpl.java:52)

           at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:370)

           at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)

           at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)

           at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1299)

           at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:52)

           at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:420)

           at java.security.AccessController.doPrivileged(Native Method)

           at java.io.ObjectStreamClass.(ObjectStreamClass.java:400)

           at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)

           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1035)

           at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)

           at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)

           at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)

           at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)

           at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)

           at org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)

           at org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:155)

           at org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:329)

           at au.com.observant.ringocore.dispatcher.enqueue.DefaultEnqueueStrategy.createObjectMessage(DefaultEnqueueStrategy.java:150)

           at au.com.observant.ringocore.dispatcher.enqueue.DefaultEnqueueStrategy.dispatch(DefaultEnqueueStrategy.java:105)

           at au.com.observant.ringocore.dispatcher.enqueue.ActiveMQDispatcherClient.dispatch(ActiveMQDispatcherClient.java:185)

           at au.com.observant.ringocore.dispatcher.tools.MsgQueueRandomMessagePump.pumpMessages(MsgQueueRandomMessagePump.java:283)

           at au.com.observant.ringocore.dispatcher.tools.MsgQueueRandomMessagePump.processMessages(MsgQueueRandomMessagePump.java:223)

           at au.com.observant.ringocore.dispatcher.tools.MsgQueueRandomMessagePump.run(MsgQueueRandomMessagePump.java:121)

           at java.lang.Thread.run(Thread.java:613)

      java.lang.OutOfMemoryError: Java heap space

           at sun.reflect.ByteVectorImpl.trim(ByteVectorImpl.java:52)

           at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:370)

           at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)

           at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)

           at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1299)

      2009-05-19 21:46:36,799 WARN  - Async error occurred: java.lang.OutOfMemoryError: Java heap space

      java.lang.OutOfMemoryError: Java heap space

           at org.apache.activemq.util.DataByteArrayOutputStream.restart(DataByteArrayOutputStream.java:61)

           at org.apache.activemq.util.DataByteArrayOutputStream.restart(DataByteArrayOutputStream.java:69)

           at org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:162)

           at org.apache.activemq.store.amq.AMQPersistenceAdapter.writeCommand(AMQPersistenceAdapter.java:692)

           at org.apache.activemq.store.amq.AMQPersistenceAdapter.writeCommand(AMQPersistenceAdapter.java:688)

           at org.apache.activemq.store.amq.AMQMessageStore.addMessage(AMQMessageStore.java:106)

           at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:503)

           at org.apache.activemq.broker.region.Queue.send(Queue.java:480)

           at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:354)

           at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:438)

           at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)

           at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)

           at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)

           at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)

           at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:455)

           at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:639)

           at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:308)

           at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:182)

           at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)

           at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)

           at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:204)

           at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)

           at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

           at java.lang.Thread.run(Thread.java:613)

           at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:52)

           at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:420)

           at java.security.AccessController.doPrivileged(Native Method)

           at java.io.ObjectStreamClass.

       

      Edited by: jalateras on May 19, 2009 2:51 PM