Different Memory Argument values for SOA Servers and BAM Servers In Weblogic 11g.

This post is about providing specific memory arguments values to SOA server and BAM servers in Weblogic 11g.

There are two scenarios:

  1. Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using startManagedWeblogic.cmd or startManagedWeblogic.sh 

  2. Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using the Admin Server Console.

Case1 :  

Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using startManagedWeblogic.cmd or startManagedWeblogic.sh 

First of all we have to analyse the startWeblogic.sh file that is used to start the Admin Server and the startManagedWeblogic.sh file that is used to start all other managed servers such as SOA server and BAM server.

Both the above mentioned file uses setDomainEnv.sh file to set the Domain related environment.

And setDomainEnv.sh file uses setSOADomainEnv.sh file for setting SOA specific environments.

So the memory related arguments like Xmx and Xms are picked up from the file : setSoaDomainEnv.sh file present in the $DomainHome/bin directory.

So, in order to provide different Xmx and Xms values for Admin Server , SOA server and BAM server we have to modify the setSOADomainEnv.sh file as shown below :

Imp : Please make sure to take backup of all the original files before modifying them .

In setSOADomainEnv.sh file comment the below lines :

# DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m"
# PORT_MEM_ARGS="-Xms2048m -Xmx2048m"

Insert the below lines replace the above commented code :

# line to specify different Xmx and Xms values to soa_server and bam_server.

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

# end of code

 

Case 2 :  

Admin Server is Started using the startWeblogic.cmd or startWeblogic.sh file and all other servers are started using the Admin Server Console.

In this case, the Memory Arguments can be provided to from the Admin Server Console using the below steps :

 

  •  Login into the Weblogic Administration Console using URL : http://admin_server_hostname:port/console
  • Expand Environment Tree available on the left hand panel of the Admin Console.
  • Click on Servers .
  • For each Server say ( soa_server1 , and bam_server ) click on the server name .
  • Then click on the Configuration tab.
  • Then go to the Server Start tab available on the top of the page.
  • Add the memory values in the Arguments field as shown below. There is no need to use newline. You can provide as many memory options as you want in this area and all the options will be separated by one white space character only.

 

-Xmx2048m -Xms2048m

  • Click Save




Post you may be Interested: 



Click If want to learn how to start Managed Servers using Node Manager and Admin Console then you can follow the below link :


If you are facing any issues with the Node Manager then you can see some debug steps in the below link :

 

 

 

Please follow and like us:

Please add your comments here