What is JAVA heap size ?
Java heap is the heap size allocated to JVM applications which takes care of the new objects
being created. If the objects being created exceed the heap size, it will throw an error saying memoryOutof Bound Java’s default heap size limit is 128MB.
If you need more than this, you should use the -Xms and -Xmx command line arguments when launching your program:
java -Xms -Xmx
We can also give like in this format also.format is : -mx256m..Sometimes it will show error if you are using
java -Xms -Xmx format..In that case use -mx256m this.value can be changed..
In this post, I will show you how to increase the Heap size in Weblogic.
There are two ways to increase the heap size in weblogic.
If you are using the nodemanager then
Login to the weblogic Administration console, then click on
Servers — ServerName — General — Remote Start Options and look for the Java Arguments
Here you can add -512Xmx -512Xms to the java arguments.
If you want to increase the heap size then alter these values from 512 to 1024 depending on your requirements.
If you do not have a nodemanager configured then follow the below mention steps.
Login the operating system , Under $domain_home/bin directory look for setDomainEnv.sh and add the following -512Xmx -512Xms to the java options.
There are 2 different type of servers in Weblogic Server
1. Admin Server
2. Managed Server
Increasing JVM Size of Admin Server
JVM size of Admin server can be increased by changing Xmx and Xms values in setDomainEnv.sh which is located in $MW_HOME/user_projects/domains/<Domain>/bin
There are two blocks for XMX and XMS in setDomainEnv.sh. Depending up on type of JVM make changes in second block. Below I changed the value of XMX and XMS of 64 Bit SUN Java to 2048 and 1024.
Increasing JVM Size of Managed Server
JVM size of Managed Server can be increased from Weblogic console. This can be achieved by adding
Xmx and Xms values start tab in Managed server shown as below
Go to the Servers ——>>> click on Server-Name ——->>> click the tab Server Start ——>>>check the Arguments
These changes will require a restart of the server.