1 Reply Latest reply on Feb 14, 2011 11:12 AM by Hanno Wiegard

    OOM when storing a message

    Hanno Wiegard Newbie

      Hi,

       

      our application uses the latest ActiveMQ-Fuse 5.4.2-00-00 release. Sending and consuming messages works fine for a couple of hours but than we receive an OOM error. This happens with a in memory queue and a broker running in the same JVM (vm://localhost) with a KahaDB store and the connection is configured to have ObjectMessageSerializationDefered set to true. Before the error occurs JConsole shows that the JVM uses 350MB out of 800MB of memory. Using ActiveMQ-Fuse 5.3.1-02 does not show this behavior.

       

      The exception is:

       

      Exception in thread "ConcurrentQueueStoreAndDispatch" java.lang.OutOfMemoryError: Java heap space

             at org.apache.activemq.util.ByteArrayOutputStream.checkCapacity(ByteArrayOutputStream.java:59)

             at org.apache.activemq.util.ByteArrayOutputStream.write(ByteArrayOutputStream.java:48)

             at java.io.DataOutputStream.write(DataOutputStream.java:90)

             at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)

             at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)

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

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

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

             at org.apache.activemq.command.ActiveMQObjectMessage.beforeMarshall(ActiveMQObjectMessage.java:201)

             at org.apache.activemq.openwire.v6.MessageMarshaller.looseMarshal(MessageMarshaller.java:277)

             at org.apache.activemq.openwire.v6.ActiveMQMessageMarshaller.looseMarshal(ActiveMQMessageMarshaller.java:111)

             at org.apache.activemq.openwire.v6.ActiveMQObjectMessageMarshaller.looseMarshal(ActiveMQObjectMessageMarshaller.java:111)

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

             at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.addMessage(KahaDBStore.java:364)

             at org.apache.activemq.store.kahadb.KahaDBStore$StoreQueueTask.run(KahaDBStore.java:1123)

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

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

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

       

       

      Thanks,

      Hanno