This controls the directory to which Apache httpd attempts to
switch before dumping core. If your operating system is configured to
create core files in the working directory of the crashing process,
If you want a core dump for debugging, you can use this directive to place it in a different location. This directive has no effect if your operating system is not configured to write core files to the working directory of the crashing processes.
If Apache httpd starts as root and switches to another user, the
Linux kernel disables core dumps even if the directory is
writable for the process. Apache httpd (2.0.46 and later) reenables core dumps
on Linux 2.4 and beyond, but only if you explicitly configure a
To enable core-dumping of suid-executables on BSD-systems (such
as FreeBSD), set kern.sugid_coredump
to 1.
On some operating systems, SIGQUIT also results in a core dump but
does not go through
For safety reasons this directive is only available if the server was
configured with the --enable-exception-hook
option. It
enables a hook that allows external modules to plug in and do something
after a child crashed.
There are already two modules, mod_whatkilledus
and
mod_backtrace
that make use of this hook. Please have a
look at Jeff Trawick's EnableExceptionHook site for more information about these.
The
Setting this value to zero means that the server will wait indefinitely until all remaining requests have been fully served.
The
It is often useful to be able to send the server a signal,
so that it closes and then re-opens its
The
As of Apache HTTP Server 2, we recommended that you only use the
The
The
Multiple
For example, to make the server accept connections on both port 80 and port 8000, use:
To make the server accept connections on two specified interfaces and port numbers, use
IPv6 addresses must be surrounded in square brackets, as in the following example:
The optional protocol argument is not required for most
configurations. If not specified, https
is the default for
port 443 and http
the default for all other ports. The
protocol is used to determine which module should handle a request, and
to apply protocol specific optimizations with the
You only need to set the protocol if you are running on non-standard
ports. For example, running an https
site on port 8443:
Address already in use
error message.
Address already in use
error message,
including other causes.SO_REUSEPORT
and distributing new connections
evenly across listening processes' (or threads') sockets using it (eg. Linux
3.9 and later, but not the current implementations of SO_REUSEPORT
in *BSDs.A ratio between the number of (online) CPU cores and the
number of listeners' buckets can be used to make Apache HTTP Server create
num_cpu_cores / ratio
listening buckets, each containing its
own
On Linux (and also BSD) a CPU core can be turned on/off if
Hotplug
is configured, therefore
There must be at least twice the number of CPU cores than the
configured ratio for this to be active. The recommended
ratio is 8
, hence at least 16
cores should be available at runtime when this value is used.
The right ratio to obtain maximum performance needs to be calculated
for each target system, testing multiple values and observing the variations in your
key performance metrics.
This directive influences the calculation of the
Setting the SO_REUSEPORT
option on the listening socket(s)
consequently allows multiple processes (sharing the same EUID
,
e.g. root
) to bind to the the same IP address and port,
without the binding error raised by the system in the usual case.
This also means that multiple instances of Apache httpd configured on a
same IP:port
and with a positive
Within the same instance, Apache httpd will check and fail to start if
multiple
The maximum length of the queue of pending connections.
Generally no tuning is needed or desired, however on some
systems it is desirable to increase this when under a TCP SYN
flood attack. See the backlog parameter to the
listen(2)
system call.
This will often be limited to a smaller number by the operating system. This varies from OS to OS. Also note that many OSes do not use exactly what is specified as the backlog, but use a number based on (but normally larger than) what is set.
The
For non-threaded servers (i.e., 256
; to increase it, you must also raise
For threaded and hybrid servers (e.g. 16
(25
(
free()
The free()
. In threaded MPMs, every
thread has its own allocator. When set
to zero, the threshold will be set to unlimited.
MaxRequestsPerChild
is still supported.The 0
, then the process will never expire.
Setting
Maximum number of idle threads. Different MPMs deal with this directive differently.
For MaxSpareThreads 250
. These MPMs deal with idle threads
on a server-wide basis. If there are too many idle threads in the
server then child processes are killed until the number of idle
threads is less than this number. Additional processes/threads
might be created if
For MaxSpareThreads 100
. Since this MPM runs a
single-process, the spare thread count is also server-wide.
10
.
The range of the
Minimum number of idle threads to handle request spikes. Different MPMs deal with this directive differently.
MinSpareThreads 75
and deal with idle threads on a server-wide
basis. If there aren't enough idle threads in the server then child
processes are created until the number of idle threads is greater
than number. Additional processes/threads
might be created if
MinSpareThreads 10
and, since it is a single-process
MPM, tracks this on a server-wide bases.
5
.
Apache HTTP Server uses a scoreboard to communicate between its parent and child processes. Some architectures require a file to facilitate this communication. If the file is left unspecified, Apache httpd first attempts to create the scoreboard entirely in memory (using anonymous shared memory) and, failing that, will attempt to create the file on disk (using file-based shared memory). Specifying this directive causes Apache httpd to always create the file on the disk.
If file-path is not an absolute path, the location specified
will be relative to the value of
File-based shared memory is useful for third-party applications that require direct access to the scoreboard.
If you use a
The server will set the TCP receive buffer size to the number of bytes specified.
If set to the value of 0
, the server will use the
OS default.
Sets the server's TCP send buffer size to the number of bytes specified. It is often useful to set this past the OS's standard default value on high speed, high latency connections (i.e., 100ms or so, such as transcontinental fast pipes).
If set to the value of 0
, the server will use the
default value provided by your OS.
Further configuration of your operating system may be required to elicit better performance on high speed, high latency connections.
On some operating systems, changes in TCP behavior resulting
from a larger
For the
Special care must be taken when using this directive. If
With the
With
With
There is a hard limit of ServerLimit 20000
compiled
into the server (for the
The
The default value differs from MPM to MPM. StartServers 3
; 5
; 2
.
Number of threads created on startup. As the
number of threads is dynamically controlled depending on the
load, (see
For StartThreads 50
and, since there is only a single
process, this is the total number of threads created at startup to
serve requests.
This directive sets the maximum configured value for
Special care must be taken when using this directive. If
The default value for 1920
when used with 64
when used with the others.
There is a hard limit of ThreadLimit 20000
(or
ThreadLimit 100000
with ThreadLimit 15000
with
This directive sets the number of threads created by each
child process. The child creates these threads at startup and
never creates more. If using an MPM like
The default value for 64
when used with 25
when used with the others.
The value of
The
ulimit -s
(8MB if unlimited) is used as the default stack
size.The
With