You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mahmood Naderan <nt...@yahoo.com.INVALID> on 2020/07/10 10:47:24 UTC

[users@httpd] Checking if MPM is working

Hi
The output of "apache2 -V" and "apache2 -l" commands show that MPM prefork is not available in my apache web server.


# apache2 -V
[Fri Jul 10 15:13:36.293467 2020] [core:warn] [pid 25107] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2020-03-13T12:26:16
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:
Server compiled with....
 -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=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"
# apache2 -l
Compiled in modules:
  core.c
  mod_so.c
  mod_watchdog.c
  http_core.c
  mod_log_config.c
  mod_logio.c
  mod_version.c
  mod_unixd.c



However, if I change the value of MaxRequestWorkers in mod-enabled/mpm_prefork.conf and restart the web server, I can verify that the number of dots in /server-status changes.

So, am I using prefork or not? Any idea?


Regards,
Mahmood

Re: [users@httpd] Checking if MPM is working

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jul 10, 2020 at 12:47 PM Mahmood Naderan
<nt...@yahoo.com.invalid> wrote:
>
> >Did you see this syntax error?
>
>
> OK I commented that line and left that to the apache's default.

Put it back and continue to invoke apachectl instead of "apache2".

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Checking if MPM is working

Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
>Did you see this syntax error?

OK I commented that line and left that to the apache's default.
Now I can see MPM status

# apache2 -V
[Fri Jul 10 21:15:32.121146 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Jul 10 21:15:32.121269 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Jul 10 21:15:32.121285 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Jul 10 21:15:32.121306 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jul 10 21:15:32.165899 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Fri Jul 10 21:15:32.166652 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jul 10 21:15:32.167426 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jul 10 21:15:32.167460 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jul 10 21:15:32.167680 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Jul 10 21:15:32.167712 2020] [core:warn] [pid 49516] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
Server version: Apache/2.4.29 (Ubuntu)
Server built:   2020-03-13T12:26:16
Server's Module Magic Number: 20120211:68
Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
Compiled using: APR 1.6.3, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)



Regards,
Mahmood 


Re: [users@httpd] Checking if MPM is working

Posted by Holger Schramm <li...@schramm.by>.
Am 10.07.20 um 18:41 schrieb Mahmood Naderan:
> The server is Ubuntu 18.04 and I installed that via apt. The apachectl 
> command says it is using MPM.
[...]
>     Server MPM: prefork

you use prefork.

>>Did you see this syntax error?
> 
> Regarding that error, the following line in not commented
> 
> DefaultRuntimeDir ${APACHE_RUN_DIR} >
> I don't remember that I have intentionally uncommentted that. What is 
> the default setting then?

i am under debian and have no ubuntu near by me. in debian there is a 
file envvars. search for it.

in this file there is a line:

export APACHE_RUN_DIR=/var/run/apache2$SUFFIX

check if the dir exists.


Kind regards,
Holger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Checking if MPM is working

Posted by Mahmood Naderan <nt...@yahoo.com.INVALID>.
The server is Ubuntu 18.04 and I installed that via apt. The apachectl command says it is using MPM.


# apachectl status
                  Apache Server Status for localhost (via ::1)

   Server Version: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1

   Server MPM: prefork

   Server Built: 2020-03-13T12:26:16

     ----------------------------------------------------------------------

   Current Time: Friday, 10-Jul-2020 21:00:16 +0430

   Restart Time: Friday, 10-Jul-2020 15:10:54 +0430

   Parent Server Config. Generation: 1

   Parent Server MPM Generation: 0

   Server uptime: 5 hours 49 minutes 22 seconds

   Server load: 1.81 2.09 2.14

   Total accesses: 287766 - Total Traffic: 63.6 GB

   CPU Usage: u376.8 s74.98 cu0 cs0 - 2.16% CPU load

   13.7 requests/sec - 3.1 MB/second - 231.7 kB/request

   62 requests currently being processed, 28 idle workers

 WRK._WKKKRWRKR_W_WR_RRWWC.K___WKW____K__W__WR_K_WRR_WRWKKRR_WKKR
 W..RK_K_R__RR.WW.KW._.R.R...K._W.._W.K.._..W........C.._........
 ................................................................
 ................................................................
 ................................................................
 ................................................................
 ................................................................
 ................................................................
 ................................................................
 ........................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process





>Did you see this syntax error?

Regarding that error, the following line in not commented 

DefaultRuntimeDir ${APACHE_RUN_DIR}

I don't remember that I have intentionally uncommentted that. What is the default setting then?

Regards,
Mahmood 


Re: [users@httpd] Checking if MPM is working

Posted by Eric Covener <co...@gmail.com>.
> # apache2 -V
> [Fri Jul 10 15:13:36.293467 2020] [core:warn] [pid 25107] AH00111: Config variable ${APACHE_RUN_DIR} is not defined

use apachectl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Checking if MPM is working

Posted by Holger Schramm <li...@schramm.by>.
Am 10.07.20 um 12:47 schrieb Mahmood Naderan:
> Hi
> 
> The output of "apache2 -V" and "apache2 -l" commands show that MPM 
> prefork is not available in my apache web server.

which os? i see ubuntu. but which one?

> # apache2 -V
> [Fri Jul 10 15:13:36.293467 2020] [core:warn] [pid 25107] AH00111: 
> Config variable ${APACHE_RUN_DIR} is not defined
> apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: 
> DefaultRuntimeDir must be a valid directory, absolute or relative to 
> ServerRoot

Did you see this syntax error?

> Server version: Apache/2.4.29 (Ubuntu)
> Server built:   2020-03-13T12:26:16
> Server's Module Magic Number: 20120211:68
> Server loaded:  APR 1.6.3, APR-UTIL 1.6.1
> Compiled using: APR 1.6.3, APR-UTIL 1.6.1
> Architecture:   64-bit
> Server MPM:
> Server compiled with....
>   -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=256
>   -D HTTPD_ROOT="/etc/apache2"
>   -D SUEXEC_BIN="/usr/lib/apache2/suexec"
>   -D DEFAULT_PIDLOG="/var/run/apache2.pid"
>   -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>   -D DEFAULT_ERRORLOG="logs/error_log"
>   -D AP_TYPES_CONFIG_FILE="mime.types"
>   -D SERVER_CONFIG_FILE="apache2.conf"
> # apache2 -l
> Compiled in modules:
>    core.c
>    mod_so.c
>    mod_watchdog.c
>    http_core.c
>    mod_log_config.c
>    mod_logio.c
>    mod_version.c
>    mod_unixd.c
> 
> 
> 
> However, if I change the value of MaxRequestWorkers in 
> mod-enabled/mpm_prefork.conf and restart the web server, I can verify 
> that the number of dots in /server-status changes.
> 
> 
> So, am I using prefork or not? Any idea?

look in the mods-enabled directory. there should a file containing mpm 
in the name.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org