Mailing List Archive

Strange behavior on varnish 5
Hi All,

We are 2 behaviors on Varnish 5:

- if we set ttl = 600s , we are seeing HIT is serving the content over 10s
. Origin is not changing the content and we are NOT sending
if_modified_since header.

- VCL_return lookup
- Hit 527698198 *-0.990171<<<< why it is a hit but ttl is
negative value * 0.000000 0.000000
- VCL_call HIT
- VCL_Log hit index: 305
- VCL_Log x-cache-hit:Buffer
- VCL_Log rsp-source:Buffer
- VCL_Log x-ingest:false
- VCL_return deliver
- Link bereq 288421900 bgfetch
- Timestamp Fetch: 1526569247.693528 0.000478 0.000478
- RespProtocol HTTP/1.1
- RespStatus 403


- How to disable background fetch ?.

Thanks,
Prem
Re: Strange behavior on varnish 5 [ In reply to ]
Hello,

You are discovering grace :-)

https://varnish-cache.org/docs/trunk/users-guide/vcl-grace.html

"set beresp.grace = 0s;" should do it.

--
Guillaume Quintard

On Thu, May 17, 2018 at 5:44 PM, Prem Kumar <n.premkumar.me@gmail.com>
wrote:

> Hi All,
>
> We are 2 behaviors on Varnish 5:
>
> - if we set ttl = 600s , we are seeing HIT is serving the content over 10s
> . Origin is not changing the content and we are NOT sending
> if_modified_since header.
>
> - VCL_return lookup
> - Hit 527698198 *-0.990171<<<< why it is a hit but ttl is
> negative value * 0.000000 0.000000
> - VCL_call HIT
> - VCL_Log hit index: 305
> - VCL_Log x-cache-hit:Buffer
> - VCL_Log rsp-source:Buffer
> - VCL_Log x-ingest:false
> - VCL_return deliver
> - Link bereq 288421900 bgfetch
> - Timestamp Fetch: 1526569247.693528 0.000478 0.000478
> - RespProtocol HTTP/1.1
> - RespStatus 403
>
>
> - How to disable background fetch ?.
>
> Thanks,
> Prem
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
Re: Strange behavior on varnish 5 [ In reply to ]
Hit 527698198 *-0.990171<<<< why it is a hit but ttl is
negative value * *0.000000 << Grace is 0* 0.000000
- VCL_call HIT

We set to zero.

Thanks,
Prem



On Thu, May 17, 2018 at 9:15 PM, Guillaume Quintard <
guillaume@varnish-software.com> wrote:

> Hello,
>
> You are discovering grace :-)
>
> https://varnish-cache.org/docs/trunk/users-guide/vcl-grace.html
>
> "set beresp.grace = 0s;" should do it.
>
> --
> Guillaume Quintard
>
> On Thu, May 17, 2018 at 5:44 PM, Prem Kumar <n.premkumar.me@gmail.com>
> wrote:
>
>> Hi All,
>>
>> We are 2 behaviors on Varnish 5:
>>
>> - if we set ttl = 600s , we are seeing HIT is serving the content over
>> 10s . Origin is not changing the content and we are NOT sending
>> if_modified_since header.
>>
>> - VCL_return lookup
>> - Hit 527698198 *-0.990171<<<< why it is a hit but ttl is
>> negative value * 0.000000 0.000000
>> - VCL_call HIT
>> - VCL_Log hit index: 305
>> - VCL_Log x-cache-hit:Buffer
>> - VCL_Log rsp-source:Buffer
>> - VCL_Log x-ingest:false
>> - VCL_return deliver
>> - Link bereq 288421900 bgfetch
>> - Timestamp Fetch: 1526569247.693528 0.000478 0.000478
>> - RespProtocol HTTP/1.1
>> - RespStatus 403
>>
>>
>> - How to disable background fetch ?.
>>
>> Thanks,
>> Prem
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc@varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
Re: Strange behavior on varnish 5 [ In reply to ]
On Thu, May 17, 2018 at 6:03 PM, Prem Kumar <n.premkumar.me@gmail.com> wrote:
> Hit 527698198 -0.990171<<<< why it is a hit but ttl is negative
> value 0.000000 << Grace is 0 0.000000
> - VCL_call HIT
>
> We set to zero.

Are you actively setting it to zero? The default is 10s.

This could be related to the recent changes in TTL calculation:

https://github.com/varnishcache/varnish-cache/pull/2555

Dridi
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc