[Varnish] #243: Missing errorhandling code in cnt_lookup(), cache_center.c line 543 when using restart
Varnish
varnish-bugs at projects.linpro.no
Thu Jun 5 13:24:25 CEST 2008
#243: Missing errorhandling code in cnt_lookup(), cache_center.c line 543 when
using restart
----------------------+-----------------------------------------------------
Reporter: drewr | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: major | Keywords:
----------------------+-----------------------------------------------------
I switched to using the {{{restart}}} action in hopes of using multiple
backends, but threads started dying with this message:
{{{
2008-06-04 17:34:35.095805500 start child pid 14915
2008-06-04 17:34:35.101414500 Child said (2, 14915): <<Child starts>>
2008-06-04 17:34:35.101444500 Child said (2, 14915): <<managed to mmap
32212254720 bytes of 32212254720>>
2008-06-04 17:34:35.101448500 Child said (2, 14915): <<Ready>>
2008-06-04 17:34:42.243450500 Child said (2, 14915): <<Missing
errorhandling code in cnt_lookup(), cache_center.c line 543:>>
2008-06-04 17:34:42.243462500 Child said (2, 14915): << Condition((p) !=
0) not true.>>
2008-06-04 17:34:42.251317500 Cache child died pid=14915 status=0x6
}}}
Here's my vcl:
{{{
backend s3 {
.host = "207.171.183.117";
.port = "80";
}
backend web1 {
.host = "web1";
.port = "80";
}
acl purge {
"localhost";
"127.0.0.1";
"web1";
}
sub vcl_recv {
set req.grace = 30s;
if (req.request == "GET" && req.url ~ "\.(gif|jpg|swf|css|js)$") {
if (req.restarts == 0) {
set req.backend = web1;
} else {
set req.backend = s3;
}
lookup;
}
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
lookup;
}
}
sub vcl_fetch {
if (obj.status != 200) {
restart;
}
set obj.grace = 30s;
set obj.ttl = 1209600s;
remove obj.http.Set-Cookie;
}
sub vcl_hit {
if (req.request == "PURGE") {
set obj.ttl = 0s;
error 200 "Purged.";
}
}
sub vcl_miss {
if (req.request == "PURGE") {
error 404 "Not in cache.";
}
if (req.http.user-agent ~ "spider") {
error 503 "Not presently in cache";
}
}
}}}
And my start options:
{{{
$VARNISHD \
-a 0.0.0.0:8000 \
-T 127.0.0.1:8001 \
-f $VARNISHCONF \
-F \
-h classic,150001 \
-n $CACHEDIR \
-P $CACHEDIR/varnishd.pid \
-s file,$CACHEDIR/cache,30GB \
-p thread_pools=4 \
-p lru_interval=3600 \
-u $USER
}}}
I'm using {{{trunk at 2646}}}.
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/243>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list