Thursday, 31 July 2014

Allocate specific JVM memory for the SOA

This post  describes how to control the allocation of memory resource in the JVM to the servers on a SOA or BAM install.

When we are trying to start the SOA Server, some times we will get the error like "java.lang.OutOfMemoryError: Java heap space"

It is possible that one of the deployed composites is using up more memory than expected, or the configured JVM heap space is too low for the deployed applications. If this problem began occurring recently, then this may be due to a recently deployed composite.

We can resolve this issue using either of the following solutions. 


Solution 1

Modify the setSOADomainEnv.sh file.
Note: Do not forget to make backup for the setSOADomainEnv.sh file before editing it.
This file can be found in: $FMW_HOME/user_projects/domains//bin
In the file setSOADomainEnv.sh
- replace

DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
- with

if [ "${SERVER_NAME}" = "soa_server1" ] || [ "${SERVER_NAME}" = "soa_server2" ]; then
      DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
      PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
elif [ "${SERVER_NAME}" = "bam_server1" ] || [ "${SERVER_NAME}" = "bam_server2" ]; then
      DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
      PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then
      DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
      PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
else
      DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
      PORT_MEM_ARGS="-Xms2048m -Xmx2048m"
fi

Solution 2

Specify the memory arguments in the Administration Console

a. Login into the Weblogic Administration Console
b. Expand Environmentc. Click on Serversd. For each Server click on the server name
e. On the Configuration tab
f. Go to the Server Start tab
g. Add the memory settings in the Arguments field: -Xms2048m -Xmx2048mh. Click Save

No comments:

Post a Comment