R12 Login Page issue: Java.Lang.OutOfMemoryError: Java Heap Space Error

 R12 Login Page issue: Java.Lang.OutOfMemoryError: Java Heap Space Error

Issue:

We were facing issue in our R12 (12.1.3) E-business suite environment, where all of sudden users were not able to get the login page but existing users were able to use forms/navigate between forms, but not able to use JSP pages. After investigation, we came to know the root cause of the issue.

Log File Location: $INST_TOP/logs/ora/10.1.3/opmn/oacore_default_group_1/oacorestd.err


14/08/12 12:21:51 java.lang.OutOfMemoryError: Java heap space

14/08/12 12:23:05 java.lang.OutOfMemoryError: GC overhead limit exceeded

Solution:

Reset the Java Heap Size in your R12 application server.

Step 1: Identify the maximum Heap Size you can set in your server.

applprod@server:~$ java -mx4096m -version

Invalid maximum heap size: -Xmx4096m

The specified size exceeds the maximum representable size.

Could not create the Java virtual machine.

applprod@server:~$ java -mx3048m -version

java version "1.6.0_10"

Java(TM) SE Runtime Environment (build 1.6.0_10-b33)

Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

From this output, we can say maximum 3 GB Java Heap Size can be set in our server.

Step 2: Edit opmn.xml file.

Location : $INST_TOP/ora/10.1.3/opmn/conf/

Edit opmn.xml file for the following parameters (Xms & Xmx)

Search for string Xms or Xmx or module-id=”OC4J”

This search should lead you to below location

‘<‘process-type id=”oacore” module-id=”OC4J” status=”enabled” working-dir=”$ORACLE_HOME/j2ee/home”‘>’
‘<‘category id=”start-parameters”‘>’
‘<‘data id=”java-options” value=”-server -verbose:gc -Xmx512M -Xms128M ……]

The default value for Maximum (-Xmx) and Minimum (-Xms) heap sizes are 512M and 128M respectively.

Again here you have options, you can set both Xms and Xmx has the same value as Xmx if you feel all your sessoins require higher memory or set a lower value for Xms and the maximum value for Xmx. Dont forget to change the values under ‘<‘category id=”stop-parameters”‘>’

opmn.xml also contains jvm configurations for other components – oafm & forms.

Step 3: Edit oc4j.properties file.

Location : ($INST_TOP/ora/10.1.3/j2ee/oacore/config)

This step is optional since we had already made changes in opmn.xml but there is no harm in making the change here. This step will come handy for troubleshooting specific components of Oracle viz., configurator, iSupplier or any other option which heavily utilizes/consumes CPU/memory.

Search for string Xms or Xmx or wrapper.

Option 1: If you find any of the above parameters change the values corresponding to the value you had  mentioned in opmn.xml or even more than that, as long as you dont exceed the maximum heap size limit.

Option 2: If you DO NOT find any of the above parameters, then make an entry like this, under the heading “Java Object Cache Configuration Parameters”

wrapper.bin.parameters=-Xms[Value]M -Xmx[Value]M -XX:NewSize=256M -XX:MaxNewSize=256M

Step 4: Edit Applications Context file

vi $CONTEXT_FILE

Location: $INST_TOP/appl/admin/SID_hostname.xml

search for string s_oacore_jvm_start_options

Change Xms and Xmx value. Repeat the same step for parameter s_oacore_jvm_stop_options.

Create tar file

Create tar file

tar -zvcf file.tar.gz file1 file2 dir1 dir2
eg :-  tar -zcvf CLN_12_1_3_AR.tar.gz CLN_12_1_3_AR


>> Details of tar :-
tar -tvf backup.tar.gz

>> UNTAR in current location

tar -xvf <file>.tar.gz

>> UNTAR in one particular directory
tar -xvf <file>.tar.gz -C /Oracle/test2
eg :-  tar -xvf test_bkp-31Dec13.tar.gz -C /Oracle/test_bkp2