Forum Moderators: phranque
[mpm_event:warn] [pid 3030:tid 139663588325568] AH00514: MaxRequestWorkers of 120 is not an integer multiple of ThreadsPerChild of 25, decreasing to nearest multiple 100 #configure MPM event module
# Optimized settings for AWS EC2 t2.medium Server
<IfModule mpm_event_module>
ServerLimit 500
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 500
MaxConnectionsPerChild 1000
</IfModule>
Apache MPM worker [httpd.apache.org]
Two directives set hard limits on the number of active child processes and the number of server threads in a child process, and can only be changed by fully stopping the server and then starting it again. ServerLimit is a hard limit on the number of active child processes, and must be greater than or equal to the MaxRequestWorkers directive divided by the ThreadsPerChild directive. ThreadLimit is a hard limit of the number of server threads, and must be greater than or equal to the ThreadsPerChild directive.
But in httpd.conf I have thisI took this to mean that these were values you'd entered yourself, but did you mean that this is part of the default config file that you haven't changed?
For threaded and hybrid servers (e.g. event or worker) MaxRequestWorkers restricts the total number of threads that will be available to serve clients. For hybrid MPMs the default value is 16 (ServerLimit) multiplied by the value of 25 (ThreadsPerChild). Therefore, to increase MaxRequestWorkers to a value that requires more than 16 processes, you must also raise ServerLimit.
Special care must be taken when using this directive. If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated. If both ServerLimit and MaxRequestWorkers are set to values higher than the system can handle, Apache httpd may not start or the system may become unstable.I would prefer not to think that “unstable” here means “the server starts making up numbers out of the clear blue sky”.
No...that's the old name for MaxRequestWorkers, right?
MaxRequestWorkers was called MaxClients before version 2.3.13. The old name is still supported.
<IfModule mpm_event_module> httpd -V pm.max_children Server version: Apache/2.4.39 ()
Server built: Apr 4 2019 18:09:28
Server's Module Magic Number: 20120211:84
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: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
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/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
-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" H20? Hmmm, that's a new one on me. Will have to check it out.