Friday, November 22, 2013

Changing OACORE JVMs in R12 without autoconfig

Following are the steps to increase the number of OACORE JVMs in R12 with minimal downtime (< 1min) and to preserve the changes even after autoconfig is run at a later time.


1. On the node where Apache is running, go to, cd $ORA_CONFIG_HOME/10.1.3/opmn/conf folder
2. Take backup of opmn.xml file and edit the following section,

<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 -Xmx1024M -Xms512M -XX:MaxPermSize=256M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Dhttp.cookie.ignoreCommaInCookiesNamed=X_NoMatchingCookies"/>
<data id="java-bin" value="/u01/cell/inst/apps/cell_edolapplin1/admin/scripts/"/>
<data id="oc4j-options" value="-out /u01/cell/inst/apps/cell_edolapplin1/logs/ora/10.1.3/opmn/oacorestd.out -err /u01/cell/inst/apps/cell_edolapplin1/logs/ora/10.1.3/opmn/oacorestd.err"/>
<category id="stop-parameters">
<data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -XX:MaxPermSize=160M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
<category id="security-parameters">
<data id="wallet-file" value="file:/u01/cell/inst/apps/cell_edolapplin1/certs/Apache"/>
<start timeout="600" retry="2"/>
<stop timeout="120"/>
<restart timeout="720" retry="2"/>
<port id="default-web-site" range="21670-21674" protocol="ajp"/>
<port id="rmi" range="20170-20174"/>
<port id="jms" range="23170-23174"/>
<process-set id="default_group" numprocs="5"/>

In the above opmn.xml file block, change the last tag from,

<process-set id="default_group" numprocs="3"/>to <process-set id="default_group" numprocs="5"/>

3. In the context file $INST_TOP/appl/admin/celldb_edolapplin1.xml, change the following block from

<oacore_nprocs oa_var="s_oacore_nprocs">3</oacore_nprocs> to <oacore_nprocs oa_var="s_oacore_nprocs">5</oacore_nprocs>

4. No need to run autoconfig, just reload the opmn with the below command,

# reload

5. Validate that 5 JVMs have been indeed started by status

# status

Risks and pointers:

1. Make sure the port range for rmi and jms is 5. Using 'netstat' check if those ports are in use or not.
2. If the port range is not specifying 5 ports, assign 5 ports as per the port pool value.
3. Make similar change in context file in the below tags,
<port id="rmi" range="20170-20174"/>
<port id="jms" range="23170-23174"/>
4. You have a choice of customizing your template rather than directly changing your xml file as well.

For any questions on this article please don't hesitate to email me on