Switching MPM Type for Oracle HTTP Server 12c

Posted by Dirk Nachbar on Friday, April 07, 2017
The Oracle HTTP Server (OHS) comes by default with the MPM (Multi-Processing Modules) Type event for Linux systems, but sometimes you need to change the MPM Type for example to prefork.

The Oracle HTTP Server comes by default with 4 MPM Types:
  • Worker: This is the default for non-Linux UNIX Platforms, e.g. Solaris, AIX ...
  • Event: This is the default for Linux Platforms
  • Prefork: This Type implements a non-threaded, pre-forking server, that handles request as an Apache HTTPD Server 1.3
  • WinNT: This is the default for Windows Platforms
For more details about the MPM Types see http://docs.oracle.com/middleware/12212/webtier/administer-ohs/man_server.htm#zzaszzohszzmpm

In case you need to switch the MPM Type, you need at first to check if you have a standalone OHS or a OHS in a WebLogic Server Domain, as the way to switch the MPM Type is depending on these 2 options.

Switching MPM for a standalone OHS:

Simply connect to your server as oracle user and perform following steps:
cd $DOMAIN_HOME/config/fmwconfig/components/OHS/<OHS_Componentname>/

# Open the Config File ohs.plugins.nodemanager.properties
# and add following line at the end
# depending on your desired MPM Type
# mpm = prefork
# mpm = worker
# mpm = event
mpm = prefork

After that restart your OHS with:
cd $DOMAIN_HOME/bin
./stopComponent.sh <OHS_Componentname>
./startComponent.sh <OHS_Componentname> 

Switching MPM for OHS in a WebLogic Domain

Simply connect to your server as oracle user and perform following steps:
$ORACLE_HOME/oracle_common/common/bin/wlst.sh
connect('weblogic', '<AdminPassword>', '<servername>:<Port>')
editCustom()
cd('oracle.ohs')
cd('oracle.ohs:type=OHSInstance.NMProp,OHSInstance=<OHS_Componentname>,component=OHS')
startEdit()
# Set here your desired MPM Type
# possible values are:
# - prefork
# - event
# - worker
# - winnt (only for Windows)
set('Mpm','prefork') 
save()
activate()

After that restart your OHS with:
cd $DOMAIN_HOME/bin
./stopComponent.sh <OHS_Componentname>
./startComponent.sh <OHS_Componentname> 


Categories: