<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-06-21 20:27 GMT+02:00 Geoff Simmons <span dir="ltr"><<a href="mailto:geoff@uplex.de" target="_blank">geoff@uplex.de</a>></span>:</div><div class="gmail_quote"><br></div><div class="gmail_quote">First of all thanks a lot for the answer! </div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">On 06/21/2016 07:27 PM, Luca Toscano wrote:<br>
><br>
> -   VSL            timeout -   End            synth<br>
<br>
</span>The timeout (-T arg of the VSL tools) starts when the Begin tag for a<br>
transaction is read from shared memory, and ticks until the End tag is<br>
read for that transaction. If End is not encountered before the<br>
timeout expires, you get the synthesized VSL record.<br>
<br>
So in your example, VSL isn't seeing End in the log before the timeout<br>
elapses, probably 120 seconds if you haven't changed the default. This<br>
could happen, for example, if you have a response that takes that long<br>
to complete.<br></blockquote><div><br></div><div>My understanding is that a Varnish worker will flush all the tags related to a specific request only when it is done with it (this is what I got from <a href="https://info.varnish-software.com/blog/understanding-timeouts-varnish-cache">https://info.varnish-software.com/blog/understanding-timeouts-varnish-cache</a>). As written in my past email I tried to set up a basic backend timeout scenario but I wasn't able to reproduce the VSL error. More details:</div><div><br></div><div>- Varnish -> Apache -> PHP-FPM <-> php script that sleeps for 200 seconds before emitting HTML</div><div>- Varnish is configured with default parameters plus "-p first_byte_timeout=150" (note: bigger than the 120 seconds set by default for VSL timeout, the default one is 60)</div><div>- a simple curl request for the URL that runs the PHP script correctly triggers a backend fetch timeout, but Begin|End SLT Timestamps are there. </div><div>- I also tried with varnishlog -g request -T 5 to force a VSL Timeout, but didn't succeed.  <br></div><div><br></div><div>Is it possible that the VSL timeout is something related only to the data flow between SHM and varnishkafka (so not related to the time taken by a Varnish worker to serve a request) ? </div><div><br></div><div>If this is completely false and incorrect, would you mind to give me a more specific example about how to trigger a VSL timeout?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
To set the timeout in a VSL client, you can use:<br>
<br>
VSL_Arg(vsl, 'T', timeout)<br>
<br>
... where timeout is a string containing decimal digits.<br>
<br>
varnishevent is very similar to varnishkafka and supports -T, you can<br>
see some working code here:<br>
<br>
<a href="https://code.uplex.de/uplex-varnish/varnishevent/blob/master/src/varnishevent.c#L641" rel="noreferrer" target="_blank">https://code.uplex.de/uplex-varnish/varnishevent/blob/master/src/varnishevent.c#L641</a></blockquote><div> </div><div>Thanks for the link, I implemented the -T exactly in the same way yesterday for Varnishkafka, really good to have a working example to confirm my code. Also, Varnishevent looks really awesome, nice work! Looking forward to test it :)</div><div><br></div><div>Regards,</div><div><br></div><div>Luca  </div></div><br></div></div>