It's so diffcult for me to tracing the timeout problem.
I painted a map of the backend request. I tracing varnish, found that cache/cache_obj.c:ObjWaitState lock for waiting backend response. But the vwe_thread epoll wait time is not right, it is default time 100s When epoll_wait is run, it wait for backend response first_bytes_timeout, which in my case is 7s. If I set cache_waiter_epoll.c:vwe_thread => vwe->next = now + 1, all is right. The timeout time became 2s. I read some varnish code, not full. I want know where is the code that varnish add the backend response header read event to epoll when keepalive is enable. I guess It's cnt_miss in my case, but I can't see the code, it's in vgc.so. How can see the vgc.so's origin code which is generated by libvcc. Thanks. On 29 December 2016 at 16:21:47, Boukelmoune Dridi ([email protected]) wrote: On Thu, Dec 29, 2016 at 3:44 AM, JackDrogon <[email protected]> wrote: > How to disable backend keep-alive. I want to test it. In vcl_backend_fetch, you can do: set bereq.http.connection = "close"; That's how it's specified in HTTP/1.1, by default a connection is persistent. Dridi
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
