[CentOS] prefork vs worker mpm in apache

Tue Nov 3 15:17:22 UTC 2015
Tim Dunphy <bluethundr at gmail.com>

Hey guys,

We had to recompile apache 2.4.12 because we needed to disable thread
safety in php (ZTS).  Because for some reason when compiling php with the
--disable-maintainer-zts with the worker mpm model and checking the php
info page, it was saying that thread safety was still enabled.

So when we recompiled apache to use the prefetch worker model instead of
worker, the php info page was showing that  thread safety was disabled.

But after that change apache processes spiked from around 11 processes per
machine to well over 250 processes at any given time.

These are the tuning settings we have in apache:

StartServers 10

#MinSpareServers 10

#MaxSpareServers 25

ServerLimit 250

MaxRequestWorkers 250

MaxConnectionsPerChild 1000

KeepAlive On

KeepAliveTimeout 30

EnableSendfile Off


So I was just wondering how this change could've cause this problem of
having the number of apache processes spike. And if there are any other
changes we can make to apache to bring the process count down?

Also I realize that installing apache / php from source isn't standard
practice on red hat variants. But at the time that these servers were setup
the latest apache at that time (2.4.12) wasn't available as an RPM. So we
just decided to install from source.

Thanks

Tim



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B