Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Can't get MPM Worker to work..

I've installed the php-zts package, uncommented #HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd and restarted the httpd service.

the httpd printout:

[root@web06 ~]# httpd -V
Server version: Apache/2.2.3
Server built:   Sep  3 2009 17:38:51
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

the Apache:

[root@web06 ~]# apachectl -v
Server version: Apache/2.2.3
Server built:   Sep  3 2009 17:41:45
[root@web06 ~]# apachectl -l
Compiled in modules:
  core.c
  worker.c
  http_core.c
  mod_so.c

Server's details:

Linux web 2.6.18-164.15.1.el5PAE #1 SMP Wed Mar 17 12:14:29 EDT 2010 i686 i686 i386 GNU/Linux

How come the https still works in prefork mode?

I feel I miss something really basic..

Thanks!

EDIT 1

[root@web06 ~]# ps -ef | grep httpd
apache    4366 14700  0 05:44 ?        00:00:34 /usr/sbin/httpd
apache    9239 14700  0 06:07 ?        00:00:22 /usr/sbin/httpd
apache    9260 14700  0 06:07 ?        00:00:23 /usr/sbin/httpd
apache    9271 14700  0 06:07 ?        00:00:23 /usr/sbin/httpd
apache    9288 14700  0 06:07 ?        00:00:22 /usr/sbin/httpd
apache    9337 14700  0 06:07 ?        00:00:23 /usr/sbin/httpd
root     14700     1  0 Aug08 ?        00:00:00 /usr/sbin/httpd
apache   14702 14700  0 Aug08 ?        00:00:00 /usr/sbin/httpd
apache   22445 14700  0 06:57 ?        00:00:04 /usr/sbin/httpd
apache   22480 14700  0 06:57 ?        00:00:04 /usr/sbin/httpd
apache   27910 14700  0 07:10 ?        00:00:00 /usr/sbin/httpd
apache   27917 14700  0 07:10 ?        00:00:00 /usr/sbin/httpd
root     27948  9898  0 07:11 pts/2    00:00:00 grep httpd

EDIT 2

[root@web06 ~]# ls -l /usr/sbin/httpd*
-rwxr-xr-x 1 root root 315284 Sep  3  2009 /usr/sbin/httpd
-rwxr-xr-x 1 root root 327708 Sep  3  2009 /usr/sbin/httpd.event
-rwxr-xr-x 1 root root 327708 Sep  3  2009 /usr/sbin/httpd.worker

[root@web06 ~]# cat /var/log/httpd/error_log
[Thu Aug 09 07:26:14 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t
[Thu Aug 09 07:26:14 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 07:26:14 2012] [notice] Digest: done
[Thu Aug 09 07:26:14 2012] [notice] mod_python: Creating 4 session mutexes based on 6 max processes and 25 max threads.
[Thu Aug 09 07:26:14 2012] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

EDIT 3

[root@web06 conf]# grep '/etc/sysconfig/httpd' /etc/init.d/httpd
# config: /etc/sysconfig/httpd
if [ -f /etc/sysconfig/httpd ]; then
        . /etc/sysconfig/httpd
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server

EDIT 4

Output of sh -x /etc/init.d/httpd start > /tmp/apache.debug 2>&1

EDIT 5

After running the commands by @quanta:

[root@web06 ~]# ps -ef | grep httpd
root     16303     1  0 08:29 ?        00:00:00 /usr/sbin/httpd.worker
apache   16305 16303  2 08:29 ?        00:00:37 /usr/sbin/httpd.worker
apache   16307 16303  2 08:29 ?        00:00:35 /usr/sbin/httpd.worker
root     20415 20381  0 08:56 pts/1    00:00:00 grep httpd
share|improve this question
    
we all know here that you must be running redhat or centos as you are talking about /etc/sysconfig/httpd. But please specify os version and tag it so that people who are looking for the answer might find it. –  coincoin Aug 8 '12 at 19:21
    
@EricDANNIELOU thanks, I've updated the question. –  Kuf Aug 9 '12 at 6:10
    
ps -ef | grep httpd? –  quanta Aug 9 '12 at 7:10
    
ls -l /usr/sbin/httpd*? tail -30 /var/log/httpd/error_log after restarting? –  quanta Aug 9 '12 at 7:17
    
Lack of the asterisk at the end. Make sure that /usr/sbin/httpd.worker exists and executable. Also post the init script /etc/init.d/httpd? –  quanta Aug 9 '12 at 7:30

1 Answer 1

up vote 2 down vote accepted

Don't know why the first check ps -ef | grep httpd still shows /usr/sbin/httpd but since I see the belows in the debug:

+ /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd.worker'
...
+ success 'httpd.worker startup'

I'm pretty sure that your Apache is running in worker mode, and the second check prove that:

[root@web06 ~]# ps -ef | grep [h]ttpd
root     16303     1  0 08:29 ?        00:00:00 /usr/sbin/httpd.worker
apache   16305 16303  2 08:29 ?        00:00:37 /usr/sbin/httpd.worker
apache   16307 16303  2 08:29 ?        00:00:35 /usr/sbin/httpd.worker

DON'T use httpd -V to check the mode which Apache is running in, because:

# which httpd
/usr/sbin/httpd

Use apachectl -V (uppercase) instead:

Server version: Apache/2.2.3
Server built:   Oct 20 2011 17:03:44
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Worker
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

or /server-info:

$ lynx -dump http://yourdomain.com/server-info | grep -i mpm
   MPM Name: Worker
   MPM Information: Max Daemons: 1 Threaded: yes Forked: yes
   Server Built With: -D APACHE_MPM_DIR="server/mpm/prefork" -D
          AcceptMutex - Valid accept mutexes for this platform and MPM
share|improve this answer
    
I don't get it.. You are right.. it is working.. but i didn't change any settings!!!! weird... anyways, thats so much for your time, effort, and explanation! –  Kuf Aug 9 '12 at 14:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.