Running BPEL Process Causes "java.lang.OutOfMemoryError: Java heap space" - Related to Domain auditLevel and collaxa.cube.xml Logging Level (Doc ID 950646.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle(R) BPEL Process Manager - Version 10.1.3.1 to 10.1.3.5.0
Information in this document applies to any platform.
***Checked for relevance on 12-Sep-2011***
***Checked for relevance on 13-Feb-2013***

Symptoms

You are running a BPEL process that after some time results in an out of memory error.  You have already tuned the JVM for BPEL by following best practices or a document such as <Note 416818.1> BPEL Server hangs due to "java.lang.OutOfMemoryError"  but the out of memory still happens.

Observing the JVM with a monitoring tool such as jvisualvm shows frequent filling of the Eden Space and rapid filling of the Old Gen which is resulting in frequent garbage collections.  The container slows and eventually runs out of memory.

The running BPEL process does extensive XML manipulations such as for example the use of While loop(s) that do several Assign activities which are doing copies between variables.

Note:  Extensive XML manipulations is not meant to imply that there is a very large XML payload file involved or that there is a large XML Transformation in the flow, though these may exist in fact exist.  The problem can still happen without a large XML payload and without a large XML Transformation(s).


At the time of the error the $OH/opmn/logs/<BPEL Container>.log may show a similar error:

<2009-09-30 18:26:05,061> <DEBUG> <mfg.collaxa.cube.engine.bpel> <BPELAssignWMP::process_test> executing operation copy at line 617
09/09/30 18:26:05 java.lang.OutOfMemoryError: Java heap space
09/09/30 18:26:05     at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
09/09/30 18:26:05     at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:518)
09/09/30 18:26:05     at java.lang.StringBuffer.append(StringBuffer.java:307)
09/09/30 18:26:05     at java.io.StringWriter.write(StringWriter.java:72)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLOutputStream.flush(XMLOutputStream.java:316)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLText.print(XMLText.java:947)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printTextNode(XMLPrintDriver.java:383)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:527)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:515)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:515)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:515)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:515)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printChildNodes(XMLPrintDriver.java:515)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:327)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLPrintDriver.printElement(XMLPrintDriver.java:247)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLElement.print(XMLElement.java:3557)
09/09/30 18:26:05     at oracle.xml.parser.v2.XMLNode.print(XMLNode.java:2688)
09/09/30 18:26:05     at com.collaxa.cube.xml.dom.DOMUtil.toXML(DOMUtil.java:1822)
09/09/30 18:26:05     at com.collaxa.cube.engine.core.BaseDetailsFormatter.write(BaseDetailsFormatter.java:111)
09/09/30 18:26:05     at com.collaxa.cube.engine.core.BaseDetailsFormatter.write(BaseDetailsFormatter.java:87)
09/09/30 18:26:05     at com.collaxa.cube.engine.core.BaseDetailsFormatter.formatVariable(BaseDetailsFormatter.java:77)
09/09/30 18:26:05     at com.collaxa.cube.engine.core.BaseDetailsFormatter.format(BaseDetailsFormatter.java:65)
09/09/30 18:26:05     at com.collaxa.cube.engine.core.AuditTrail.logEvent(AuditTrail.java:228)
09/09/30 18:26:05     at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__logExecuteSuccess(BPELAssignWMP.java:1472)
09/09/30 18:26:05     at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.performCopyTo(BPELAssignWMP.java:1129)
09/09/30 18:26:05     at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:215)
09/09/30 18:26:05     at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
<2009-09-30 18:26:05,086> <ERROR> <mfg.collaxa.cube.xml> java.lang.OutOfMemoryError: Java heap space
JAM Agent: Port is 13227
09/09/30 18:26:10 java.lang.OutOfMemoryError: Java heap space
09/09/30 18:26:10     at com.evermind.server.jms.JMSObject.add(JMSObject.java:531)
09/09/30 18:26:10     at com.evermind.server.jms.JMSObject.lock(JMSObject.java:321)
09/09/30 18:26:10     at com.evermind.server.jms.JMSObject.lock(JMSObject.java:306)
09/09/30 18:26:10     at com.evermind.server.jms.JMSObject.lockReceive(JMSObject.java:286)
09/09/30 18:26:10     at com.evermind.server.jms.EvermindSession.getOneMessage(EvermindSession.java:1144)
09/09/30 18:26:10     at com.evermind.server.jms.EvermindMessageConsumer.getOneMessage(EvermindMessageConsumer.java:444)
09/09/30 18:26:10     at com.evermind.server.jms.EvermindMessageConsumer.receive(EvermindMessageConsumer.java:192)
09/09/30 18:26:10     at com.evermind.server.ejb.MessageDrivenConsumer.receiveMessage(MessageDrivenConsumer.java:424)
09/09/30 18:26:10     at com.evermind.server.ejb.MessageDrivenConsumer.processMessages(MessageDrivenConsumer.java:213)
09/09/30 18:26:10     at com.evermind.server.ejb.MessageDrivenConsumer.run(MessageDrivenConsumer.java:169)
09/09/30 18:26:10     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
09/09/30 18:26:10     at java.lang.Thread.run(Thread.java:595)
09/09/30 18:26:10 java.lang.OutOfMemoryError: Java heap space



Of particular interest in the log above is this from the stack:

com.collaxa.cube.engine.core.AuditTrail.logEvent(AuditTrail.java:228)



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms