From: Joshua Slive Date: Sun, 19 Nov 2000 04:24:18 +0000 (+0000) Subject: Using an mpm_common.html file for the common directives makes X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b982734f095326121b0ef7d94a41ee4512405a7b;p=apache Using an mpm_common.html file for the common directives makes things considerably easier. But, there is still lots of work to do. Clearly, some of the directives are not implemented exactly the same. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87020 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mpm_common.html b/docs/manual/mod/mpm_common.html new file mode 100644 index 0000000000..75dd0b8082 --- /dev/null +++ b/docs/manual/mod/mpm_common.html @@ -0,0 +1,409 @@ + + + +Apache MPM Common Directives + + + + + + +

Multi-Processing Module Common Directives

+ +

This file documents directives that are implemented by more +than one multi-processing module (MPM). +

+ +

Directives

+ +
+ +

CoreDumpDirectory directive

+ +

Syntax: CoreDumpDirectory directory
+Default: the same location as ServerRoot
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

This controls the directory to which Apache attempts to switch +before dumping core. The default is in the ServerRoot directory, however since +this should not be writable by the user the server runs as, core dumps +won't normally get written. If you want a core dump for debugging, +you can use this directive to place it in a different location.


+ +

PidFile directive

+ +

Syntax: PidFile filename
+Default: PidFile logs/httpd.pid
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

The PidFile directive sets the file to which the server records the +process id of the daemon. If the filename does not begin with a slash +(/) then it is assumed to be relative to the ServerRoot.

+ +

It is often useful to be able to send the server a signal, so that +it closes and then reopens its ErrorLog and TransferLog, and re-reads +its configuration files. This is done by sending a SIGHUP (kill -1) +signal to the process id listed in the PidFile.

+ +

The PidFile is subject to the same warnings about log file placement and +security.

+ + +


+ + +

LockFile directive

+

Syntax: LockFile filename
+Default: LockFile logs/accept.lock
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

The LockFile directive sets the path to the lockfile used when +Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or +USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be +left at its default value. The main reason for changing it is if +the logs directory is NFS mounted, since the lockfile +must be stored on a local disk. The PID of the main +server process is automatically appended to the filename.

+ +

SECURITY: It is best to avoid putting this file in a +world writable directory such as /var/tmp because someone +could create a denial of service attack and prevent the server from +starting by creating a lockfile with the same name as the one the +server will try to create.

+ +
+ +

MaxClients directive

+ +

Syntax: MaxClients number
+Default: MaxClients 8 (with threads) +MaxClients 256 (no threads)
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

The MaxClients directive sets the limit on the number of child +processes that will be created to serve requests. When the server is +built without threading, no more than this number of clients can be +served simultaneously. To configure more than 256 clients, you must +edit the HARD_SERVER_LIMIT entry in +mpm_default.h and recompile. + +

Any connection attempts over the MaxClients limit will normally +be queued, up to a number based on the +ListenBacklog directive. Once a child process is freed at the +end of a different request, the connection will then be serviced.

+ +

When the server is compiled with threading, then the maximum number +of simultaneous requests that can be served is obtained from the value +of this directive multiplied by ThreadsPerChild.

+ +
+ +

MaxRequestsPerChild directive

+ +

Syntax: MaxRequestsPerChild number
+Default: MaxRequestsPerChild 10000
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

The MaxRequestsPerChild directive sets the limit on the number of requests +that an individual child server process will handle. After MaxRequestsPerChild +requests, the child process will die. If MaxRequestsPerChild is 0, then +the process will never expire.

+ +Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects: +

+ +

NOTE: For KeepAlive requests, only the first +request is counted towards this limit. In effect, it changes the +behavior to limit the number of connections per child. + +


+ + +

MaxSpareThreads directive

+ +

Syntax: MaxSpareThreads number
+Default: MaxSpareThreads ??
+Context: server config
+Status: core
+Module: mpmt_pthread

+ +

Content needed here!

+ +

See also MinSpareThreads and +StartServers. + +


+ +

MinSpareThreads directive

+ +

Syntax: MinSpareServers number
+Default: MinSpareServers ???
+Context: server config
+Status: core
+Module: mpmt_pthread

+ +

fix me

+ +

The MinSpareServers directive sets the desired minimum number of idle +child server processes. An idle process is one which is not handling +a request. If there are fewer than MinSpareServers idle, then the parent +process creates new children at a maximum rate of 1 per second.

+ +Tuning of this parameter should only be necessary on very busy sites. +Setting this parameter to a large number is almost always a bad idea.

+ +This directive has no effect on Microsoft Windows. + +

+ +See also MaxSpareThreads and +StartServers.


+ + +

ScoreBoardFile directive

+ +

Syntax: ScoreBoardFile filename
+Default: ScoreBoardFile logs/apache_status +
+Context: server config
+Status: MPM
+ +Module: mpmt_pthread, prefork

+ +

The ScoreBoardFile directive is required on some architectures to place +a file that the server will use to communicate between its children and +the parent. The easiest way to find out if your architecture requires +a scoreboard file is to run Apache and see if it creates the file named +by the directive. If your architecture requires it then you must ensure +that this file is not used at the same time by more than one invocation +of Apache.

+ +

If you have to use a ScoreBoardFile then you may see improved speed by +placing it on a RAM disk. But be careful that you heed the same warnings +about log file placement and +security.

+ +

See Also: +Stopping and Restarting Apache

+ + +


+ +

StartServers directive

+ +

Syntax: StartServers number
+Default: StartServers 5
+Context: server config
+Status: MPM
+Module: mpmt_pthread, prefork

+ +

The StartServers directive sets the number of child server processes created +on startup. As the number of processes is dynamically controlled depending +on the load, there is usually little reason to adjust this parameter.

+ +

See also MinSpareThreads and +MaxSpareThreads.


+ +

ThreadsPerChild

+

Syntax: ThreadsPerChild number
+Default: ThreadsPerChild 50
+Context: server config
+Status: Base
+Module: mpmt_pthread

+ +

This directive sets the number of threads created by each child +process.

+ + + + + diff --git a/docs/manual/mod/mpmt_pthread.html b/docs/manual/mod/mpmt_pthread.html index da3e8241d9..a4ab2c5710 100644 --- a/docs/manual/mod/mpmt_pthread.html +++ b/docs/manual/mod/mpmt_pthread.html @@ -14,7 +14,7 @@ > -

Mulit-Processing Module mpmt_pthread

+

Multi-Processing Module mpmt_pthread

This Multi-Processing Module controls process and thread creation using the pthread interface. @@ -47,387 +47,17 @@ decreasing the number of processes.

Directives

-
- -

CoreDumpDirectory directive

- -

Syntax: CoreDumpDirectory directory
-Default: the same location as ServerRoot
-Context: server config
-Status: Base
-Module: mpmt_pthread

- -

This controls the directory to which Apache attempts to switch -before dumping core. The default is in the ServerRoot directory, however since -this should not be writable by the user the server runs as, core dumps -won't normally get written. If you want a core dump for debugging, -you can use this directive to place it in a different location.


- -

PidFile directive

- -

Syntax: PidFile filename
-Default: PidFile logs/httpd.pid
-Context: server config
-Status: Base
-Module: mpmt_pthread

- -

The PidFile directive sets the file to which the server records the -process id of the daemon. If the filename does not begin with a slash -(/) then it is assumed to be relative to the ServerRoot.

- -

It is often useful to be able to send the server a signal, so that -it closes and then reopens its ErrorLog and TransferLog, and re-reads -its configuration files. This is done by sending a SIGHUP (kill -1) -signal to the process id listed in the PidFile.

- -

The PidFile is subject to the same warnings about log file placement and -security.

- - -


- - -

LockFile directive

-

Syntax: LockFile filename
-Default: LockFile logs/accept.lock
-Context: server config
-Status: Base
-Module: mpmt_pthread

- -

The LockFile directive sets the path to the lockfile used when -Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or -USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be -left at its default value. The main reason for changing it is if -the logs directory is NFS mounted, since the lockfile -must be stored on a local disk. The PID of the main -server process is automatically appended to the filename.

- -

SECURITY: It is best to avoid putting this file in a -world writable directory such as /var/tmp because someone -could create a denial of service attack and prevent the server from -starting by creating a lockfile with the same name as the one the -server will try to create.

- -
- -

MaxClients directive

- -

Syntax: MaxClients number
-Default: MaxClients 8 (with threads) -MaxClients 256 (no threads)
-Context: server config
-Status: core
-Module: mpmt_pthread

- -

The MaxClients directive sets the limit on the number of child -processes that will be created to serve requests. When the server is -built without threading, no more than this number of clients can be -served simultaneously. To configure more than 256 clients, you must -edit the HARD_SERVER_LIMIT entry in -mpm_default.h and recompile. - -

Any connection attempts over the MaxClients limit will normally -be queued, up to a number based on the -ListenBacklog directive. Once a child process is freed at the -end of a different request, the connection will then be serviced.

- -

When the server is compiled with threading, then the maximum number -of simultaneous requests that can be served is obtained from the value -of this directive multiplied by ThreadsPerChild.

- -
- -

MaxRequestsPerChild directive

- -

Syntax: MaxRequestsPerChild number
-Default: MaxRequestsPerChild 10000
-Context: server config
-Status: core
-Module: mpmt_pthread

- -

The MaxRequestsPerChild directive sets the limit on the number of requests -that an individual child server process will handle. After MaxRequestsPerChild -requests, the child process will die. If MaxRequestsPerChild is 0, then -the process will never expire.

- -Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects: -

- -

NOTE: For KeepAlive requests, only the first -request is counted towards this limit. In effect, it changes the -behavior to limit the number of connections per child. - -


- - -

MaxSpareThreads directive

- -

Syntax: MaxSpareThreads number
-Default: MaxSpareThreads ??
-Context: server config
-Status: core
-Module: mpmt_pthread

- -

Content needed here!

- -

See also MinSpareThreads and -StartServers. - -


- -

MinSpareThreads directive

- -

Syntax: MinSpareServers number
-Default: MinSpareServers ???
-Context: server config
-Status: core
-Module: mpmt_pthread

- -

fix me

- -

The MinSpareServers directive sets the desired minimum number of idle -child server processes. An idle process is one which is not handling -a request. If there are fewer than MinSpareServers idle, then the parent -process creates new children at a maximum rate of 1 per second.

- -Tuning of this parameter should only be necessary on very busy sites. -Setting this parameter to a large number is almost always a bad idea.

- -This directive has no effect on Microsoft Windows. - -

- -See also MaxSpareThreads and -StartServers.


- - -

ScoreBoardFile directive

- -

Syntax: ScoreBoardFile filename
-Default: ScoreBoardFile logs/apache_status -
-Context: server config
-Status: Base
- -Module: mpmt_pthread

- -

The ScoreBoardFile directive is required on some architectures to place -a file that the server will use to communicate between its children and -the parent. The easiest way to find out if your architecture requires -a scoreboard file is to run Apache and see if it creates the file named -by the directive. If your architecture requires it then you must ensure -that this file is not used at the same time by more than one invocation -of Apache.

- -

If you have to use a ScoreBoardFile then you may see improved speed by -placing it on a RAM disk. But be careful that you heed the same warnings -about log file placement and -security.

- -

See Also: -Stopping and Restarting Apache

- - -


- -

StartServers directive

- -

Syntax: StartServers number
-Default: StartServers 5
-Context: server config
-Status: core
-Module: mpmt_pthread

- -

The StartServers directive sets the number of child server processes created -on startup. As the number of processes is dynamically controlled depending -on the load, there is usually little reason to adjust this parameter.

- -

See also MinSpareThreads and -MaxSpareThreads.


- -

ThreadsPerChild

-

Syntax: ThreadsPerChild number
-Default: ThreadsPerChild 50
-Context: server config
-Status: Base
-Module: mpmt_pthread

- -

This directive sets the number of threads created by each child -process.

- diff --git a/docs/manual/mod/prefork.html b/docs/manual/mod/prefork.html new file mode 100644 index 0000000000..ba305704f1 --- /dev/null +++ b/docs/manual/mod/prefork.html @@ -0,0 +1,130 @@ + + + +Apache MPM mpmt_pthread + + + + + + +

Multi-Processing Module prefork

+

+This Multi-Processing Module implements a pre-forking web server. +

+ +

Status: MPM +
+Source File: prefork.c +
+Module Identifier: mpm_prefork_module +

+ +

Summary

+ +

This Multi-Processing Module (MPM) implements a pre-forking +non-threaded web server which handles request in a manner +very similar to the default behavior of Apache 1.3 on Unix.

+ + +

Directives

+ + +
+ + +

MaxSpareServers directive

+ +Syntax: MaxSpareServers number
+Default: MaxSpareServers 10
+Context: server config
+Status: core

+ +The MaxSpareServers directive sets the desired maximum number of idle +child server processes. An idle process is one which is not handling +a request. If there are more than MaxSpareServers idle, then the parent +process will kill off the excess processes.

+ +Tuning of this parameter should only be necessary on very busy sites. +Setting this parameter to a large number is almost always a bad idea.

+ +

+ +See also MinSpareServers and +StartServers.


+ +

MinSpareServers directive

+ +Syntax: MinSpareServers number
+Default: MinSpareServers 5
+Context: server config
+Status: core

+ +The MinSpareServers directive sets the desired minimum number of idle +child server processes. An idle process is one which is not handling +a request. If there are fewer than MinSpareServers idle, then the parent +process creates new children at a maximum rate of 1 per second.

+ +Tuning of this parameter should only be necessary on very busy sites. +Setting this parameter to a large number is almost always a bad idea.

+ +This directive has no effect on Microsoft Windows. + +

+ +See also MaxSpareServers and +StartServers.


+ + + + +