[3.0] bc568b8 Increase varnishtest's HTTP rx timeout to 15 seconds, a lot of test failures seems to be timeouts on stressed machines.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:03:58 CEST 2011


commit bc568b808c422ac3404f026ddaa7af2636239916
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 20 19:49:04 2011 +0000

    Increase varnishtest's HTTP rx timeout to 15 seconds, a lot of
    test failures seems to be timeouts on stressed machines.
    
    Teport timeouts more clearly.

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index d01240b..7dad4ed 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -343,7 +343,10 @@ http_rxchar_eof(struct http *hp, int n)
 		pfd[0].events = POLLIN;
 		pfd[0].revents = 0;
 		i = poll(pfd, 1, hp->timeout);
-		if (i <= 0)
+		if (i < 0)
+			vtc_log(hp->vl, 0, "HTTP rx timeout (%u ms)",
+			    hp->timeout);
+		if (i < 0)
 			vtc_log(hp->vl, 0, "HTTP rx failed (poll: %s)",
 			    strerror(errno));
 		assert(i > 0);
@@ -1143,7 +1146,7 @@ http_process(struct vtclog *vl, const char *spec, int sock, int sfd)
 	ALLOC_OBJ(hp, HTTP_MAGIC);
 	AN(hp);
 	hp->fd = sock;
-	hp->timeout = 5000;
+	hp->timeout = 15000;
 	hp->nrxbuf = 2048*1024;
 	hp->vsb = VSB_new_auto();
 	hp->rxbuf = malloc(hp->nrxbuf);		/* XXX */



More information about the varnish-commit mailing list