[4.1] 6834a80 Log if we retried too many times from v_b_e too

Federico G. Schwindt fgsch at lodoss.net
Fri Sep 4 15:54:50 CEST 2015


commit 6834a80205fa9803e70e341b0f087f97dc702288
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Fri Jul 10 18:26:06 2015 +0100

    Log if we retried too many times from v_b_e too

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 0d7ba9f..12703bd 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -808,9 +808,12 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
 			VDI_Finish(bo->wrk, bo);
 		}
 
-		if (wrk->handling == VCL_RET_RETRY &&
-		    bo->retries++ < cache_param->max_retries)
-			return (F_STP_RETRY);
+		if (wrk->handling == VCL_RET_RETRY) {
+			if (bo->retries++ < cache_param->max_retries)
+				return (F_STP_RETRY);
+			VSLb(bo->vsl, SLT_VCL_Error,
+			    "Too many retries, delivering 503");
+		}
 
 		return (F_STP_FAIL);
 	}



More information about the varnish-commit mailing list