BPEL Server hangs due to "java.lang.OutOfMemoryError"

Friday, January 29, 2010

Symptoms
The BPEL server hangs and a java.lang.OutOfMemoryError is displayed in the domain.log file.

You will see the following stack trace in the domain.log



failed to handle message
javax.ejb.EJBException: Transaction was rolled back: java.lang.OutOfMemoryError; nested
exception
is: java.rmi.RemoteException: ; nested exception is:
java.lang.OutOfMemoryError
java.rmi.RemoteException: ; nested exception is:
java.lang.OutOfMemoryError
at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:886)
at

ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSe
ssionBeanWrapper16.java:1846)
at

com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMe
ssageHandler.java:37)
...
.....
Message handle error.
An exception occurred while attempting to process the message
"com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is:
Transaction was rolled back: java.lang.OutOfMemoryError; nested exception is:
java.rmi.RemoteException: ; nested exception is:
java.lang.OutOfMemoryError

ORABPEL-05002

Message handle error.
An exception occurred while attempting to process the message
"com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is:
Transaction was rolled back: java.lang.OutOfMemoryError; nested exception is:
java.rmi.RemoteException: ; nested exception is:
java.lang.OutOfMemoryError


Cause
The BPEL OC4J container uses 512 MB of memory by default 512MB, which is not enough if you are running BPEL in a high load environment.

You need to increase the JVM settings. Here is are some recommendations for a Linux Box with 4GB of memory and 2 CPUs. (If you are using a different platform from Linux, these parameters may not apply.)


-Xms2048m –Xmx2048m –Xmn1024m –XX:SurvivorRatio=6 –XX:MaxPermSize=256m

-Xmn1228m
Garbage collector (Oracle recommends sizing the Eden space to be 60 to 70 percent of the total heap size.)

-Xms2048m
Iniatial heapsize. The heap size controls the amount of memory the JVM uses

-Xmx2048m
Maximum heapsize

Solution
To implement the solution, please execute the following steps:
1. Shut down your application server
2. Backup the \opmn\conf\opmn.xml
3. Increase the BPEL JVM settings. Edit the file \opmn\conf\opmn.xml :

3.1 Look for the OC4J_BPEL process type section
Look for the entry
-server -Xms256M -Xmx512M
and replace it with
-server -Xms2048m –Xmx2048m –Xmn1024m –XX:SurvivorRatio=6 –XX:MaxPermSize=256m

  © Blogger templates Newspaper by Ourblogtemplates.com 2008

Back to TOP