Name

ChildLife — define maximum child process lifetime

SYNOPSIS

interval

DESCRIPTION

Interchange page servers are, by default, periodically restarted to make sure there are no problems arising from long-running processes (such as memory leaks).

In general, restarting is handled by the MaxRequestsPerChild configuration directive.

However, when PreFork ic run mode is used, some page servers never win the page server "selection battle"; they never get to serve a page request and consequently they are never restarted by MaxRequestsPerChild. This is why the ChildLife directive restarts a page server on an unconditional, periodic basis to make sure all servers are re-started from time to time.

If ChildLife is not set, the "starved" page servers will act just like they did before; get stuck in an internal loop forever until kill -9 on the process happens.

This should clear up the problem where people see with a growing number of servers over time.

DIRECTIVE TYPE AND DEFAULT VALUE

Global directive

EXAMPLES

Example: Setting ChildLife

ChildLife 30 minutes

NOTES

The directive should only be used when Interchange is in PreFork ic run mode.

The directive value can be any Interchange interval.

AVAILABILITY

ChildLife is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 452

['ChildLife',         'time',             0],

Source: lib/Vend/Config.pm
Line 4115 (context shows lines 4115-4127)

sub parse_time {
my($var, $value) = @_;
my($n);

return $value unless $value;

#  $C->{Source}->{$var} = [$value];

$n = time_to_seconds($value);
config_error("Bad time format ('$value') in the $var directive\n")
unless defined $n;
$n;
}

AUTHORS

Mike Heins

SEE ALSO

MaxRequestsPerChild(7ic), PIDcheck(7ic), PIDfile(7ic), MaxServers(7ic), PreFork(7ic)

DocBook! Interchange!