I am using servicemix 3.2.1
Following is my thread pool configuration:
servicemix.corePoolSize = 100
servicemix.maximumPoolSize = 200
servicemix.queueSize = 256
I am sending 89 users concurrently to test a use case. The message flow is
as follows:
1) Application1 sends message to http-consumer
2) http-consumer sends the request to a bean.
3) bean adds property in message and sends the message to Camel component
for validation
4) After validation message is sent to Camel routing component which sends
the message to JMS Provider(Topic) and returns response to the calling
application (Application1).
5) Message is subscribed by 2 JMS consumers based on a message selector
property specified for each of them.
6) JMS consumer forward message to a HTTP provider through a Camel routing
in a INOUT mode (Required for error handling)
7) HTTP provider sends the message to another application (Application2).
My servicemix takes 393M memory at startup and when I hit these 89 requests
concurrently it jumps to 707M. (this information was captured form "top"
command.)
During the processing of these requests I get following error message
randomly:
ERROR - DeadLetterChannel - Failed delivery for exchangeId:
ID-esb-test1/56696-1217081085126/0-8. On delivery attempt: 0 caught:
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
Wire format negociation timeout: peer did not send his wire format.; nested
exception is java.io.IOException: Wire format negociation timeout: peer did
not send his wire format.
org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
Wire format negociation timeout: peer did not send his wire format.; nested
exception is java.io.IOException: Wire format negociation timeout: peer did
not send his wire format.
Caused by:
javax.jms.JMSException: Wire format negociation timeout: peer did not send
his wire format.
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:58)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1185)
at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1263)
at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:276)
at
org.springframework.jms.support.JmsAccessor.createSession(JmsAccessor.java:200)
at
org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:419)
at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:484)
at
org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:470)
at
org.apache.servicemix.jms.endpoints.JmsProviderEndpoint.processInOnly(JmsProviderEndpoint.java:371)
at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(ProviderEndpoint.java:100)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
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:595)
Caused by: java.io.IOException: Wire format negociation timeout: peer did
not send his wire format.
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:88)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:47)
at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:69)
at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:74)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1175)
... 18 more
DEBUG - DefaultExceptionPolicyStrategy - Finding best suited exception
policy for thrown exception
org.springframework.jms.UncategorizedJmsException
Any further requests lead of Out of Memory error. Following is the error
log:
DEBUG - BeanComponent - Received exchange: status: Active,
role: provider
DEBUG - BeanComponent - Retrieved correlation id:
ID:127.0.0.2-11b5fae3afe-7:175
INFO - JBIContainer - Activating component for:
[container=ServiceMix,name=ID:127.0.0.2-11b5fae3afe-0:175] with service:
null component:
[EMAIL PROTECTED]
INFO - ComponentMBeanImpl - Initializing component:
ID:127.0.0.2-11b5fae3afe-0:175
INFO - ComponentMBeanImpl - Starting component:
ID:127.0.0.2-11b5fae3afe-0:175
ERROR - ComponentMBeanImpl - Could not start component
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:574)
at
java.util.concurrent.ThreadPoolExecutor.addIfUnderCorePoolSize(ThreadPoolExecutor.java:426)
at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:859)
at
org.apache.servicemix.executors.impl.ExecutorImpl.execute(ExecutorImpl.java:43)
at
org.apache.servicemix.executors.WorkManagerWrapper.scheduleWork(WorkManagerWrapper.java:56)
at
org.apache.activemq.ra.ActiveMQEndpointWorker.connect(ActiveMQEndpointWorker.java:221)
at
org.apache.activemq.ra.ActiveMQEndpointWorker.start(ActiveMQEndpointWorker.java:197)
at
org.apache.activemq.ra.ActiveMQResourceAdapter.endpointActivation(ActiveMQResourceAdapter.java:214)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow$Connector.start(JCAFlow.java:633)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onComponentStarted(JCAFlow.java:415)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow$2.componentStarted(JCAFlow.java:218)
at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.fireEvent(ComponentMBeanImpl.java:598)
at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doStart(ComponentMBeanImpl.java:301)
at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.start(ComponentMBeanImpl.java:216)
at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1145)
at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1099)
at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1058)
at
org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1010)
at
org.apache.servicemix.client.DefaultServiceMixClient.<init>(DefaultServiceMixClient.java:87)
at
org.apache.servicemix.client.DefaultServiceMixClient.<init>(DefaultServiceMixClient.java:75)
at
org.apache.servicemix.jbi.framework.ClientFactory.createClient(ClientFactory.java:62)
at
com.in2m.servicemix.operations.updateprofile.MessageEnricher.onMessageExchange(MessageEnricher.java:72)
at
org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:235)
at
org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:211)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
What can I do to resolve this problem ? and why does ServiceMix takes so
much memory ?
Pratibha
--
View this message in context:
http://www.nabble.com/High-memory-usage-and-subsequent-out-of-memory-issue-for-concurrent-users-tp18666527p18666527.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.