Questo contenuto non è disponibile nella lingua selezionata.
25.5.3. MPM Specific Server-Pool Directives
IfModule
container is necessary to define the server-pool for the MPM in use.
prefork
and worker
MPMs.
MaxClients
sets a limit on the total number of server processes, or simultaneously connected clients, that can run at one time. The main purpose of this directive is to keep a runaway Apache HTTP Server from crashing the operating system. For busy servers this value should be set to a high value. The server's default is set to 150 regardless of the MPM in use. However, it is not recommended that the value for MaxClients
exceeds 256
when using the prefork
MPM.
MaxRequestsPerChild
sets the total number of requests each child server process serves before the child dies. The main reason for setting MaxRequestsPerChild
is to avoid long-lived process induced memory leaks. The default MaxRequestsPerChild
for the prefork
MPM is 4000
and for the worker
MPM is 0
.
These values are only used with the prefork
MPM. They adjust how the Apache HTTP Server dynamically adapts to the perceived load by maintaining an appropriate number of spare server processes based on the number of incoming requests. The server checks the number of servers waiting for a request and kills some if there are more than MaxSpareServers
or creates some if the number of servers is less than MinSpareServers
.
MinSpareServers
value is 5
; the default MaxSpareServers
value is 20
. These default settings should be appropriate for most situations. Be careful not to increase the MinSpareServers
to a large number as doing so creates a heavy processing load on the server even when traffic is light.
These values are only used with the worker
MPM. They adjust how the Apache HTTP Server dynamically adapts to the perceived load by maintaining an appropriate number of spare server threads based on the number of incoming requests. The server checks the number of server threads waiting for a request and kills some if there are more than MaxSpareThreads
or creates some if the number of servers is less than MinSpareThreads
.
MinSpareThreads
value is 25
; the default MaxSpareThreads
value is 75
. These default settings should be appropriate for most situations. The value for MaxSpareThreads
must be greater than or equal to the sum of MinSpareThreads
and ThreadsPerChild
, else the Apache HTTP Server automatically corrects it.
The StartServers
directive sets how many server processes are created upon startup. Since the Web server dynamically kills and creates server processes based on traffic load, it is not necessary to change this parameter. The Web server is set to start 8
server processes at startup for the prefork
MPM and 2
for the worker
MPM.