Modification to url lookup
Arun Dobriyal
arundobriyaliitkgp at gmail.com
Tue May 22 10:15:41 CEST 2012
Hi ,
Take https://www.varnish-cache.org/trac/wiki/VCLExampleRestarts and modify
> it. You probably want to trigger the restarts in vcl_miss instead. If you
> reach it you've missed the cache, then just alter the URL and restart.
>
Thanks @Per , I was looking for this only.
I modified the vcl file and the content of my vcl_miss file is
* sub vcl_miss {
if(req.restarts==0){
std.log("I came here "+req.http.host+" and the url is "+req.url);
return(restart);
}
return (fetch);
}*
Clearly the above code should also work (It will enter the if block once
whenever it gets a cache miss.. but then subsequently the req.restarts will
increase and varnish wont enter the block) . But when I tested this on my
machine.. I get these strange messages on the varnishlog, and varnish cant
load any page.
* 0 Debug - "INCOMPLETE AT: cnt_miss(1213)"
0 WorkThread - 0xb15fd0e0 start
0 CLI - Rd vcl.load "boot" ./vcl.ndNJIZ0m.so
0 CLI - Wr 200 36 Loaded "./vcl.ndNJIZ0m.so" as "boot"
0 CLI - Rd vcl.use "boot"
0 CLI - Wr 200 0
0 CLI - Rd start
0 Debug - "Acceptor is epoll"
0 CLI - Wr 200 0
0 WorkThread - 0xb78a90e0 start
0 WorkThread - 0xb78980e0 start
0 WorkThread - 0xb78870e0 start
0 WorkThread - 0xb78760e0 start
0 WorkThread - 0xb78650e0 start
0 WorkThread - 0xb78540e0 start
0 WorkThread - 0xb78430e0 start
0 WorkThread - 0xb78320e0 start
0 WorkThread - 0xb78210e0 start
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1337673620 1.0
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1337673623 1.0
0 CLI - Rd ping*
What is this error about ?
Thanks
Arun Dobriyal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120522/795d8f60/attachment.html>
More information about the varnish-misc
mailing list