[master] dda7185c4 Add ws_thread_overflow counter

Dag Haavi Finstad daghf at varnish-software.com
Fri Oct 12 14:52:10 UTC 2018


commit dda7185c41b11b4b61d2a33cd5f7e67a7ffa8d72
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Thu Oct 11 11:56:01 2018 +0200

    Add ws_thread_overflow counter
    
    See details in r02275.vtc for why there isn't a test case for this.

diff --git a/bin/varnishd/VSC_main.vsc b/bin/varnishd/VSC_main.vsc
index e7b7b9dcf..86c0ceb7a 100644
--- a/bin/varnishd/VSC_main.vsc
+++ b/bin/varnishd/VSC_main.vsc
@@ -608,6 +608,13 @@
 
 	Number of times we ran out of space in workspace_client.
 
+.. varnish_vsc:: ws_thread_overflow
+	:level: diag
+	:group: wrk
+	:oneliner: workspace_thread overflows
+
+	Number of times we ran out of space in workspace_thread.
+
 .. varnish_vsc:: shm_records
 	:level:	diag
 	:oneliner:	SHM records
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index bfbfae374..50839143b 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -394,6 +394,8 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
 			tp = &tpx;
 		} while (tp->func != NULL);
 
+		if (WS_Overflowed(wrk->aws))
+			wrk->stats->ws_thread_overflow++;
 		/* cleanup for next task */
 		wrk->seen_methods = 0;
 	}


More information about the varnish-commit mailing list