How to set SOA Memory Argument in SOA Suite 12.2.1.4 (extra java options / arguments)

Objective :

Setting JVM memory arguments Xms & Xmx for managed servers like SOA and OSB in weblogic server.

Description :

Most commonly the JVM memory arguments Xms (minimum allocation size) and Xmx (maximum allocation size) for weblogic managed servers are set either using following options.

  1. Managed Server’s Server Start -> Arguments
  2. Setting respective startup group config in file setStartupEnv.sh file or setDomainEnv.sh file or setSOADomainEnv.sh file under DOMAIN_HOME/bin folder
  3. Create an external script file and refer from setSOADomainEnv.sh

With 12.2.1.4 version of SOA Suite there is one additional file used which consolidates lots of useful extra java parameter in one single file : setSOARefConfigEnv.sh

How to :

  1. Go to folder ORACLE_HOME/soa/common/bin
  2. Look out for file setSOARefConfigEnv.sh
  3. Set as below
# JVM Memory Arguments
if [ "${STARTUP_GROUP}" = "AdminServerStartupGroup" ] ; then
    MEM_ARGS_NEW_MIN="-Xms4g"
    export MEM_ARGS_NEW_MIN

    MEM_ARGS_NEW_MAX="-Xmx4g"
    export MEM_ARGS_NEW_MAX
else
    MEM_ARGS_NEW_MIN="-Xms16g"
    export MEM_ARGS_NEW_MIN

    MEM_ARGS_NEW_MAX="-Xmx18g"
    export MEM_ARGS_NEW_MAX
fi

Good to Know :

setSOARefConfigEnv.sh file is used inside setDomainEnv.sh as below

# Set reference configuration extra java options, if parameter passed to setSOARefConfigEnv script is true.
# To unset reference configuration extra java options, pass false as parameter to setSOARefConfigEnv script.
if [ -f /your_path/Middleware/Oracle_Home/soa/common/bin/setSOARefConfigEnv.sh ] ; then
. /your_path/Middleware/Oracle_Home/soa/common/bin/setSOARefConfigEnv.sh true
fi

This file is not mandatory file to present, if you want you can still manage all your memory and other arguments in setXXX.sh file under DOMAIN_HOME/bin folder.

If this file is set you can start your Admin via startWeblogic.sh script while all managed server must start using Node Manager (like starting managed server from Admin console or nmconnect) to take advantage of this file.

If you use scripts like startManagedWebLogic.sh to start your managed server then this file may not very helpful.

If you look at some of the key property added or being set in this file, its quite useful or easy to maintain. You can always bring more java arguments under the same file to centralize your java extra property settings.

OSB 12.2.1.4 Payload Size setting :

-Dweblogic.MaxMessageSize for message size on all protocol – This does not state that message size of your request payload that SOA or OSB can process. for that you need to set

PAYLOAD="-Dsoa.payload.threshold.kb=100000"
export PAYLOAD


provided below property is also set to true


SOA_REFCONFIG_ENABLED="-Dsoa.refconfig.enabled=true"
export SOA_REFCONFIG_ENABLED

Other useful property that you can set is soa / osb attachment size, minimum ssl protocol version, connection timeout, read timeout etc

Let me know if you find this topic interesting & useful.