Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Enable Event MPM – Apache 2.4

Event MPM is brand new, released with Apache 2.4 and works similarly as Worker MPM when it comes to processes and threads. The difference here is that Event MPM will dedicated a thread to a request and not the whole connection. The thread will free up as soon as the request is fulfilled, which means overall fewer threads are used.

To enable Event MPM edit the file at:

/etc/httpd/conf.modules.d/00-mpm.conf

You should see something like the following:

# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so

Comment whichever is enabled (uncommented) and uncomment the following line:

LoadModule mpm_event_module modules/mod_mpm_event.so

Restart apache

service httpd restart

To verify which MPM is active, issue the following at shell:

[root@server]# httpd -V | grep MPM
Server MPM:     event