<div dir="ltr"><div><span style="font-size:12.8px">Hi all,</span><br></div><div><br></div><div>I am working on Varnishkafka (<a href="https://github.com/wikimedia/varnishkafka">https://github.com/wikimedia/varnishkafka</a>), happily supporting Varnish 4 and its new VSL API. Varnishkafka allows a user to insert the Start SLT_Timestamp or the Resp one into a logline, formatted following a custom strftime string, and only recently I got some reports of logs showing an empty value instead of the Resp timestamp. After a bit of research, I discovered that some particular requests (mostly long tar.gz downloads or Websocket Upgrade request) were missing the Resp timestamp and showing the following lines (grabbed from varnishlog):</div><div><br></div><div>-   VSL            timeout</div><div>-   End            synth </div><div><br></div><div>I discovered from <a href="https://www.varnish-cache.org/docs/trunk/reference/vsl.html">https://www.varnish-cache.org/docs/trunk/reference/vsl.html</a> that the VSL tag is related to error/warnings using the VSL api, but nothing specific so I tried to dig a bit more into the code:</div><div><br></div><div>- <a href="https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl_arg.c#L350">https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl_arg.c#L350</a></div><div>- <a href="https://github.com/varnishcache/varnish-cache/blob/4.1/include/vapi/vapi_options.h#L80">https://github.com/varnishcache/varnish-cache/blob/4.1/include/vapi/vapi_options.h#L80</a></div><div>- <a href="https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl.c#L103">https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl.c#L103</a></div><div>- <a href="https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl_dispatch.c#L1342">https://github.com/varnishcache/varnish-cache/blob/4.1/lib/libvarnishapi/vsl_dispatch.c#L1342</a></div><div><br></div><div>I tried to simulate a backend fetch timeout with Varnish + Apache + PHP-FPM running a simple script sleeping for minutes, but I wasn't able to reproduce the VSL timeout (120 seconds by default as far as I understand). I am probably missing something trivial but I don't really know how to clearly identify where the issue comes from. My plan would be to add the "-T" parameter support to Varnishkafka but I'd prefer to have some explanation about what a VSL timeout is before proceeding. </div><div><br></div><div>Thanks a lot in advance!</div><div><br></div><div>Regards,</div><div><br></div><div>Luca</div></div>