Sunday, August 14, 2011

Increase java heap space for SOA Gateway

One problem you can face when you are working with a webservice that returns thousands of rows is that you will get memory problems. In the webservice SOAP response you will see something like SERVICE ERROR.

When you go into eBusiness Suite and look in the SOA Monitor you will see a java exception:
Error description SYSTEM_ERROR
Error details java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3209)
at java.lang.String.<init>(String.java:216)
at java.lang.StringBuilder.toString(StringBuilder.java:430)....

To fix this problem we need to increase the java heap space for the JVM oafm (the default value is 256MB). The below instructions will set it to 1GB.
  1. Open $ORA_CONFIG_HOME/10.1.3/opmn/conf/opmn.xml
  2. Find the row  that starts with <process-type id="oafm" module-id="OC4J" status="enabl...
  3. Under start-parameters change:
    - <data id="java-options" value="-server -verbose:gc -Xmx256M... to <data id="java-options" value="-server -verbose:gc -Xmx1024M...
  4. Under stop-parameters change:
    - <data id="java-options" value="-server -verbose:gc -Xmx256M... to <data id="java-options" value="-server -verbose:gc -Xmx1024M...
  5. Restart the opmn
    $ADMIN_SCRIPTS_HOME/adopmnctl.sh stopall
    $ADMIN_SCRIPTS_HOME/adopmnctl.sh startall

Sources

No comments:

Post a Comment

javascript:void(0)