Commit 089b1aa2 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Add and document a ping_interval parameter which controls the interval at

which the parent pings the child.  Also document pipe_timeout, which was
left out of the man page by accident.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1373 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a84565a4
......@@ -111,6 +111,9 @@ struct params {
/* HTTP proto behaviour */
unsigned backend_http11;
unsigned client_http11;
/* Ping interval */
unsigned ping_interval;
};
extern volatile struct params *params;
......
......@@ -214,13 +214,15 @@ start_child(void)
ev_listen = e;
AZ(ev_poker);
e = ev_new();
XXXAN(e);
e->timeout = 3.0;
e->callback = child_poker;
e->name = "child poker";
AZ(ev_add(mgt_evb, e));
ev_poker = e;
if (params->ping_interval > 0) {
e = ev_new();
XXXAN(e);
e->timeout = params->ping_interval;
e->callback = child_poker;
e->name = "child poker";
AZ(ev_add(mgt_evb, e));
ev_poker = e;
}
mgt_cli_start_child(heritage.fds[0], heritage.fds[3]);
AZ(close(heritage.fds[1]));
......
......@@ -407,6 +407,15 @@ tweak_client_http11(struct cli *cli, struct parspec *par, const char *arg)
/*--------------------------------------------------------------------*/
static void
tweak_ping_interval(struct cli *cli, struct parspec *par, const char *arg)
{
(void)par;
tweak_generic_uint(cli, &params->ping_interval, arg, 0, UINT_MAX);
}
/*--------------------------------------------------------------------*/
/*
* Make sure to end all lines with either a space or newline of the
* formatting will go haywire.
......@@ -566,6 +575,12 @@ static struct parspec parspec[] = {
"backend response."
EXPERIMENTAL,
"off", "bool" },
{ "ping_interval", tweak_ping_interval,
"Interval between pings from parent to child.\n"
"Zero will disable pinging entirely, which makes "
"it possible to attach a debugger to the child.\n"
MUST_RESTART,
"3", "seconds" },
{ NULL, NULL, NULL }
};
......
......@@ -28,7 +28,7 @@
.\"
.\" $Id$
.\"
.Dd October 6, 2006
.Dd May 1, 2007
.Dt VARNISHD 1
.Os
.Sh NAME
......@@ -351,7 +351,15 @@ If the overflow queue fills up,
will start dropping new connections.
.Pp
The default is 100%.
.It Va ping_interval
The interval at which the parent process will ping the child process
to ascertain that it is still present and functioning.
.Pp
The default is 3 seconds.
.It Va pipe_timeout
The time to wait before dropping an idle pipe mode connection.
.Pp
The default is 60 seconds.
.It Va sendfile_threshold
The size threshold beyond which documents are sent to the client using
.Xr sendfile 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment