hanging connections

Stig Bakken stig at zedge.net
Mon Dec 20 15:09:42 CET 2010


On Mon, Dec 20, 2010 at 9:25 AM, Kristian Lyngstol <
kristian at varnish-software.com> wrote:

> On Fri, Dec 17, 2010 at 03:40:35PM +0100, Stig Bakken wrote:
> > I have a script processing varnishlog output to give me the serving
> > latency based on the ReqEnd tag, and frequently see objects served from
> > cache, size around 25kB, that take 5+ seconds to serve.
>
> If there are two requests for an object, request A and request B, the
> following will happen:
>
> Time  |    Action
> 0s    | A asks for /foo
>      | Cache-miss - fetch from backend
> 0.5s  | B asks for /foo
>      | Cache hit on busy object - wait for it
> 5s    | Web server is finished delivering /foo
> 5.1s  | A gets /foo - cache miss
> 5.1s  | B gets /foo - cache hit
>
> It's a bit difficult to spot this as it happens, it's been a matter of
> discussion recently (Arthur being the one who first became aware of the
> issue).
>
> It sounds like this might be what you are seeing.
>
> - Kristian


Yeah, that could be it.  A race condition that is to be expected.  I'll test
whether this explains the issue by comparing 95/99-percentile latency with
cache hit rate over time.

 - Stig

-- 
Stig Bakken
CTO, Zedge.net - free your phone!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101220/53d45075/attachment-0003.html>


More information about the varnish-misc mailing list