IfModule
. By default, the server-pool is defined for both the prefork
and worker
MPMs.
/etc/httpd/conf/httpd.conf
:
MaxClients
MaxClients
directive allows you to specify the maximum number of simultaneously connected clients to process at one time. It takes the following form:
MaxClients number
number
can improve the performance of the server, although it is not recommended to exceed 256
when using the prefork
MPM.
MaxClients
directiveMaxClients 256
MaxRequestsPerChild
MaxRequestsPerChild
directive allows you to specify the maximum number of request a child process can serve before it dies. It takes the following form:
MaxRequestsPerChild number
number
to 0
allows unlimited number of requests.
MaxRequestsPerChild
directive is used to prevent long-lived processes from causing memory leaks.
MaxRequestsPerChild
directiveMaxRequestsPerChild 4000
MaxSpareServers
MaxSpareServers
directive allows you to specify the maximum number of spare child processes. It takes the following form:
MaxSpareServers number
prefork
MPM only.
MaxSpareServers
directiveMaxSpareServers 20
MaxSpareThreads
MaxSpareThreads
directive allows you to specify the maximum number of spare server threads. It takes the following form:
MaxSpareThreads number
number
must be greater than or equal to the sum of MinSpareThreads
and ThreadsPerChild
. This directive is used by the worker
MPM only.
MaxSpareThreads
directiveMaxSpareThreads 75
MinSpareServers
MinSpareServers
directive allows you to specify the minimum number of spare child processes. It takes the following form:
MinSpareServers number
number
can create a heavy processing load on the server. This directive is used by the prefork
MPM only.
MinSpareServers
directiveMinSpareServers 5
MinSpareThreads
MinSpareThreads
directive allows you to specify the minimum number of spare server threads. It takes the following form:
MinSpareThreads number
worker
MPM only.
MinSpareThreads
directiveMinSpareThreads 75
StartServers
StartServers
directive allows you to specify the number of child processes to create when the service is started. It takes the following form:
StartServers number
StartServers
directiveStartServers 8
ThreadsPerChild
ThreadsPerChild
directive allows you to specify the number of threads a child process can create. It takes the following form:
ThreadsPerChild number
worker
MPM only.
ThreadsPerChild
directiveThreadsPerChild 25