[master] 543e3df More parameter tweaks based on VUG3 discussions:
Poul-Henning Kamp
phk at varnish-cache.org
Thu Feb 24 09:04:06 CET 2011
commit 543e3dfeae2b29266cdc1cba9bc1ab9ada082826
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Feb 24 07:57:35 2011 +0000
More parameter tweaks based on VUG3 discussions:
err_ttl:
Pointless and wrongly documented. Remove and set Retry-After:
in default.vcl
expiry_sleep:
Remove misleading advise.
send_timeout:
Reduce to one minute, 10 minutes was far too long.
ban_lurker_sleep:
Reduce sleep between successful evictions to 10msec to speed
ban lurker up to max 100 objects/second.
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index 844103c..f6065f0 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -399,7 +399,6 @@ cnt_error(struct sess *sp)
TIM_format(TIM_real(), date);
http_PrintfHeader(w, sp->fd, h, "Date: %s", date);
http_PrintfHeader(w, sp->fd, h, "Server: Varnish");
- http_PrintfHeader(w, sp->fd, h, "Retry-After: %d", params->err_ttl);
if (sp->err_reason != NULL)
http_PutResponse(w, sp->fd, h, sp->err_reason);
diff --git a/bin/varnishd/default.vcl b/bin/varnishd/default.vcl
index c25f560..919e651 100644
--- a/bin/varnishd/default.vcl
+++ b/bin/varnishd/default.vcl
@@ -120,6 +120,7 @@ sub vcl_deliver {
sub vcl_error {
set obj.http.Content-Type = "text/html; charset=utf-8";
+ set obj.http.Retry-After = "5";
synthetic {"
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h
index fb94312..c027838 100644
--- a/bin/varnishd/heritage.h
+++ b/bin/varnishd/heritage.h
@@ -73,9 +73,6 @@ struct params {
/* TTL used for lack of anything better */
unsigned default_ttl;
- /* TTL used for synthesized error pages */
- unsigned err_ttl;
-
/* Maximum concurrent sessions */
unsigned max_sess;
diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c
index c215a54..201aaab 100644
--- a/bin/varnishd/mgt_param.c
+++ b/bin/varnishd/mgt_param.c
@@ -589,7 +589,7 @@ static const struct parspec input_parspec[] = {
"5", "seconds" },
{ "expiry_sleep", tweak_timeout_double, &master.expiry_sleep, 0, 60,
"How long the expiry thread sleeps when there is nothing "
- "for it to do. Reduce if your expiry thread gets behind.\n",
+ "for it to do.\n",
0,
"1", "seconds" },
{ "pipe_timeout", tweak_timeout, &master.pipe_timeout, 0, 0,
@@ -604,7 +604,7 @@ static const struct parspec input_parspec[] = {
"the session is closed.\n"
"See setsockopt(2) under SO_SNDTIMEO for more information.",
DELAYED_EFFECT,
- "600", "seconds" },
+ "60", "seconds" },
{ "auto_restart", tweak_bool, &master.auto_restart, 0, 0,
"Restart child process automatically if it dies.\n",
0,
@@ -816,10 +816,6 @@ static const struct parspec input_parspec[] = {
"Use 0x notation and do the bitor in your head :-)\n",
0,
"0", "bitmap" },
- { "err_ttl", tweak_uint, &master.err_ttl, 0, UINT_MAX,
- "The TTL assigned to the synthesized error pages\n",
- 0,
- "0", "seconds" },
{ "ban_dups", tweak_bool, &master.ban_dups, 0, 0,
"Detect and eliminate duplicate bans.\n",
0,
@@ -835,7 +831,7 @@ static const struct parspec input_parspec[] = {
" list. It always sleeps a second when nothing can be done.\n"
"A value of zero disables the ban lurker.",
0,
- "0.1", "s" },
+ "0.01", "s" },
{ "saintmode_threshold", tweak_uint,
&master.saintmode_threshold, 0, UINT_MAX,
"The maximum number of objects held off by saint mode before "
More information about the varnish-commit
mailing list