You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2009/01/06 15:28:05 UTC

[jira] Commented: (SM-1750) Exception in thread "ActiveMQ Session Task" java.lang.OutOfMemoryError: Java heap space

    [ https://issues.apache.org/activemq/browse/SM-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48502#action_48502 ] 

Jean-Baptiste Onofré commented on SM-1750:
------------------------------------------

Could you please give more information about JVM used :
- the exact JVM used (give the result of java -version)
- what's your heap configuration (in the conf/servicemix.rc or bin/servicemix) 
?

By default, SMX uses the following heap configuration :
-Xms128m -Xmx512m

Using large queue size, try to increase the heap using :
-Xmx128m -Xmx768m -XX:MaxPermSize=128m

To do it, you can edit conf/servicemix.rc and put the following properties :
JAVA_MIN_MEM=128M
JAVA_MAX_MEM=768M
and in the row 199 of the bin/servicemix, make the following change :
DEFAULT_JAVA_OPTS="-server -XX:MaxPermSize=128M $DEFAULT_JAVA_OPTS"

> Exception in thread "ActiveMQ Session Task" java.lang.OutOfMemoryError: Java heap space
> ---------------------------------------------------------------------------------------
>
>                 Key: SM-1750
>                 URL: https://issues.apache.org/activemq/browse/SM-1750
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-http
>    Affects Versions: 3.2.1
>         Environment: Ubuntu Linux which holds SMix Http component - That forwards to LWC component on a different Windows machine
>            Reporter: Soumya Pal
>
> I have a Http component f Smix 3.2.1 running in an Ubuntu machine.
> servicemix.corePoolSize    = 4
> servicemix.maximumPoolSize = 32
> servicemix.queueSize       = 256
> It connects to AMQ on another machine 192.xxx.yyy.zzz, which is also a servicemix 3.2.1 and housing an LWC component, to which the messages finally get redirected from teh http component.
> The servicemix properties of the above is 
> servicemix.corePoolSize    = 4
> servicemix.maximumPoolSize = 32
> servicemix.queueSize       = 256
> It was workign fien but all of a sudden the mechanism is breaking.
> The requests comes thorugh fine from teh http component on Ubuntu to the lwc deployed on teh 192.xxx.... windows machine as I can see from the logs and response is sent back as well from teh lwc component (as seen from logs).
> But at times the http component is failing to send back the response to teh caller client.
> 10:38:59,951 | WARN  | btpool1-2  | jetty                    | ervicemix.http.jetty.JCLLogger   96 | /Service/OurMobile/
> java.lang.IllegalStateException: Cannot write non xml faults for non soap messages
> 	at org.apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(SoapWriter.java:124)
> 	at org.apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:92)
> 	at org.apache.servicemix.http.processors.ConsumerProcessor.sendFault(ConsumerProcessor.java:277)
> 	at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:176)
> 	at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:313)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:844)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:227)
> 	at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:626)
> 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) 
> I have used a wrapper to run teh service on the Ubuntu box.
> The wrapper.log also throws an error
> Exception in thread "ActiveMQ Session Task" java.lang.OutOfMemoryError: Java heap space
> at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:518)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.lang.StringBuffer.append(StringBuffer.java:307)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(ObjectInputStream.java:3043)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:2951)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream$BlockDataInputStream.readLongUTF(ObjectInputStream.java:2934)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readString(ObjectInputStream.java:1571)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.readExternal(NormalizedMessageImpl.java:355)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.servicemix.jbi.messaging.ExchangePacket.readExternal(ExchangePacket.java:431)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.servicemix.jbi.messaging.InOutImpl.readExternal(InOutImpl.java:70)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:166)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.servicemix.jbi.nmr.flow.jms.AbstractJMSFlow.onMessage(AbstractJMSFlow.java:505)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
> INFO   | jvm 1    | 2008/12/24 12:16:57 | 	at java.lang.Thread.run(Thread.java:595)
> I am not sure which is the main issue.
> Has it got to do anythign with teh queue size of the LWC consumer which is 256? Or is teh queue size 256 of teh HTTP Smix component on the Ubuntu box has soem problem. I read somewhere that if teh queue size goes above 256 it causes problems...but I am not sure about that.
> Can anyone please suggest any solution.
> Thanks in advance.
> Soumya

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.