Three years ago, at the
Deutsche Oracle-Anwendergruppe in Mannheim, a customer from a large German manufacturer asked me about the availability of Oracle HTTP Server based upon Apache 2.0. They had already standardized on WebSphere based upon Apache 2.0, and they did not want to support both Apache 2.0 and Apache 1.3 configurations. Certainly, a reasonable request.
Within a year, Oracle released a version of the Oracle internet Application Server based upon Apache 2.0. Most Apache modules delivered with iAS were usable in an Apache 2.0 environment. But the most glaring omission was mod_plsql, which was not ported to Apache 2.0 and still required Apache 1.3.9. To this day, I'm still baffled by the decision to not port mod_plsql at that time.
Fast forward to Fall 2007, and with the
Oracle Database Release 11g distribution is something called
Oracle HTTP Server (Apache 2.0) (10.1.3.3.0) for Linux x86. This is the version of Oracle HTTP Server that is based upon Apache 2.0 and has a supported version of mod_plsql. At last!
One of the benefits of Apache 2.0 is that it supports various Multi-Processing Modules. You can choose to either use the legacy process-based (prefork) architecture or the multi-threaded (worker) architecture. One of the benefits of using the multi-threaded implementation with mod_plsql is that it supports a true database connection pool. In the previous implementations of mod_plsql on Oracle HTTP Server on Linux, there is one database connection per HTTP Server process. There really isn't any "pool". But in the multi-threaded implementation, there is a database connection pool that is shared among all threads of a child process by mod_plsql.
The size of the database connection pool cannot be adjusted within mod_plsql. If
N concurrent requests require database connections, then
N connections will be created. If a connection is idle for more than
X minutes (governed by PlsqlIdleSessionCleanupInterval), it is cleaned up. Indirectly, the Apache configuration for maximum processes and maximum threads defines the worst case peak value for possible database connections.
So I downloaded this thing called "
Oracle HTTP Server (Apache 2.0) (10.1.3.3.0) for Linux x86", installed it, configured it, and thought I was good to go. But I examined the number of processes running on Linux, and I also examined the number of database connections, and I didn't notice anything different. I believe the default was set to the multi-process module, simply for backward compatibility reasons.
MetaLink Note 299125.1 gives instructions how to configure the multithreaded MPM in Oracle HTTP Server/Apache 2.0 (without recompiling). The relevant portion of this note:
SWITCHING FROM PREFORK TO WORKER
--------------------------------
- Edit opmn.xml and find the section which defines the HTTP Server:
<ias-component id="HTTP_Server">
<process-type id="HTTP_Server" module-id="OHS2">
<module-data>
<category id="start-parameters">
<data id="start-mode" value="ssl-disabled"/>
</category>
</module-data>
<process-set id="HTTP_Server" numprocs="1"/>
</process-type>
</ias-component>
- Add start parameter "mpm":
<ias-component id="HTTP_Server">
<process-type id="HTTP_Server" module-id="OHS2">
<module-data>
<category id="start-parameters">
<data id="start-mode" value="ssl-disabled"/>
<data id="mpm" value="worker"/>
</category>
</module-data>
<process-set id="HTTP_Server" numprocs="1"/>
</process-type>
</ias-component>
and save this change to the opmn.xml file
- Execute "opmnctl reload"
- Stop Oracle HTTP Server and start it up again (just "restart" will not suffice)
To verify that Oracle HTTP Server is really using the "worker" or multi-threaded MPM, examine the output of the process listing "ps -ef" on the server operating system. If you see one or more processes named "httpd", then you are still running the "prefork" or mulit-process MPM. If you see one or more processes named "httpd.worker", then you are indeed running the multi-threaded MPM of Apache 2.0.
* Oracle HTTP Server on Windows has always been multi-threaded.
Stand back, OraNA. Here I come.