[master] 7d3ffa515 explicitly disable the send deadline on the backend side

Nils Goroll nils.goroll at uplex.de
Tue Mar 3 10:14:06 UTC 2020

commit 7d3ffa5159edbbb721276c83f43f05ae32376aa4
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Tue Mar 3 11:03:49 2020 +0100

    explicitly disable the send deadline on the backend side
    As @Dridi and myself concluded, the send_timeout had no effect on
    backend connections anyway because we never set SO_SNDTIMEO (aka
    idle_send_timeout on the client side) on backend connections.
    With the next commit, we will fix the send_timeout on the client side and
    thus would also enable it for "dripping" writes on the backend side.
    To preserve existing behavior for the time being, we explicitly disable
    the timeout (actually deadline) on the backend side. There is ongoing
    work in progress to rework all of our timeouts for 7.x.
    Implementation note: if (VTIM_real() > v1l->deadline) evaluates to false
    for v1l->deadline == NaN
    Ref #3189

diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index ad70c6868..3892b1544 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -97,9 +97,8 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
 	VTCP_blocking(*htc->rfd);	/* XXX: we should timeout instead */
-	/* XXX: what is the right timeout ? Isn't send_timeout client side? */
-	V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl,
-	    bo->t_prev + cache_param->send_timeout, 0);
+	/* XXX: need a send_timeout for the backend side */
+	V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl, nan(""), 0);
 	hdrbytes = HTTP1_Write(wrk, hp, HTTP1_Req);
 	/* Deal with any message-body the request might (still) have */

More information about the varnish-commit mailing list