activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "libo.cai" <libo....@platinumanalytics.net>
Subject OutOfMemoryError in Activemq
Date Tue, 08 Nov 2016 01:57:05 GMT
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.

Mime
View raw message