Name

PreFork — specify whether Interchange server should pre-fork processes that wait for client connections

SYNOPSIS

No | Yes

DESCRIPTION

For each new client connection, Interchange must spawn a new process that will handle communication with the client. By using PreFork, it is possible to pre-fork (or in other words, "start ahead of time") some number of Interchange servers that will be ready to serve client requests immediately as they come in.

If you're running PreFork, you should use it in combination with PreForkSingleFork, to create the absolute minimal number of forks necessary. Only turn PreForkSingleFork off if it causes zombie processes to pile up.

This method reduces system overhead due to forking and is the fastest and best way to run a busy Interchange server.

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive

EXAMPLES

Example: Enabling PreFork

PreFork yes
PreForkSingleFork yes

NOTES

Regardless of the PreFork setting, each spawned server will serve MaxRequestsPerChild requests, before being shut down and respawned. (This technique is used to prevent any memory leaks).

For an introduction to Interchange run modes and practical implications, please see the ic run mode glossary entry.

AVAILABILITY

PreFork is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 454

['PreFork',          'yesno',            0],

Source: lib/Vend/Config.pm
Line 5434 (context shows lines 5434-5446)

sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
  return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
  return 0;
}
else {
  config_error("Use 'yes' or 'no' for the $var directive\n");
}
}

AUTHORS

Interchange Development Group

SEE ALSO

ChildLife(7ic), StartServers(7ic), PreForkSingleFork(7ic)

DocBook! Interchange!