You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "libo.cai" <li...@platinumanalytics.net> on 2016/11/08 01:57:05 UTC
OutOfMemoryError in Activemq
Hi
I have got an OutOfMemoryError when I am using ActiveMQ in my Java program.
A singleton class that used to publish huge non-persistent messages to one
topic with one connection. However, I got the error as follows:
Exception in thread "pool-19-thread-1" java.lang.RuntimeException:
java.lang.OutOfMemoryError: Java heap space
at
com.lmax.disruptor.FatalExceptionHandler.handleEventException(FatalExceptionHandler.java:45)
at
com.lmax.disruptor.dsl.ExceptionHandlerWrapper.handleEventException(ExceptionHandlerWrapper.java:18)
at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:148)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: Java heap space
at
org.apache.activemq.util.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:36)
at
org.apache.activemq.util.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:33)
at
org.apache.activemq.command.ActiveMQTextMessage.storeContent(ActiveMQTextMessage.java:130)
at
org.apache.activemq.command.ActiveMQTextMessage.beforeMarshall(ActiveMQTextMessage.java:116)
at
org.apache.activemq.openwire.v10.MessageMarshaller.tightMarshal1(MessageMarshaller.java:122)
at
org.apache.activemq.openwire.v10.ActiveMQMessageMarshaller.tightMarshal1(ActiveMQMessageMarshaller.java:76)
at
org.apache.activemq.openwire.v10.ActiveMQTextMessageMarshaller.tightMarshal1(ActiveMQTextMessageMarshaller.java:76)
at
org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:234)
at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:175)
at
org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:304)
at
org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:286)
at
org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85)
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68)
at
org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
at
org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1318)
at
org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1312)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1795)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224)
at
org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
at
com.pats.process.message.ActiveMQPutModelPriceMsg.writetMsg(ActiveMQPutModelPriceMsg.java:59)
at
com.pats.process.event.handler.marshaller.ModelCacheSendHandler.onEvent(ModelCacheSendHandler.java:29)
at
com.pats.process.event.handler.marshaller.ModelCacheSendHandler.onEvent(ModelCacheSendHandler.java:12)
at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:129)
... 1 more
The JVM arguments as follows:
-Xmx2048m
-Xms512m
-XX:NewSize=256m
-XX:MaxNewSize=512m
-XX:PermSize=128m
-XX:MaxPermSize=256m
Someone who can help me? Many thanks.
--
View this message in context: http://activemq.2283324.n4.nabble.com/OutOfMemoryError-in-Activemq-tp4719068.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: OutOfMemoryError in Activemq
Posted by mlange <ml...@anwb.nl>.
Just a question about this line:
A singleton class that used to publish huge non-persistent messages to one
topic with one connection. However, I got the error as follows:
How many of these huge messages have you sent, when did it break and how big
were those messages?
This data might help to determine the problem and possible solutions (e.g.
increase the heap size)
--
View this message in context: http://activemq.2283324.n4.nabble.com/OutOfMemoryError-in-Activemq-tp4719068p4719117.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.