[master] 3a1f45d Add nuke_limited counter

Shohei Tanaka (@xcir) kokoniimasu+git at gmail.com
Mon Feb 19 08:44:08 UTC 2018


commit 3a1f45d05dcdc0d22a71148c25ae2dedcf93e6ea
Author: Shohei Tanaka(@xcir) <kokoniimasu+git at gmail.com>
Date:   Fri Feb 16 14:47:53 2018 +0900

    Add nuke_limited counter

diff --git a/bin/varnishd/VSC_main.vsc b/bin/varnishd/VSC_main.vsc
index f303453..601cef7 100644
--- a/bin/varnishd/VSC_main.vsc
+++ b/bin/varnishd/VSC_main.vsc
@@ -253,6 +253,12 @@
 	Number of times an HTTP/2 stream was refused because the queue was
 	too long already. See also parameter thread_queue_limit.
 
+.. varnish_vsc:: nuke_limited
+	:oneliner:	Reached nuke_limit
+
+	Number of times more storage space were needed, but limit was reached in
+	a nuke_limit. See also parameter nuke_limit.
+
 .. varnish_vsc:: n_object
 	:type:	gauge
 	:oneliner:	object structs made
diff --git a/bin/varnishd/storage/storage_lru.c b/bin/varnishd/storage/storage_lru.c
index cc84b97..e58ccf6 100644
--- a/bin/varnishd/storage/storage_lru.c
+++ b/bin/varnishd/storage/storage_lru.c
@@ -172,6 +172,7 @@ LRU_NukeOne(struct worker *wrk, struct lru *lru)
 
 	if (wrk->strangelove-- <= 0) {
 		VSLb(wrk->vsl, SLT_ExpKill, "LRU reached nuke_limit");
+		VSC_C_main->nuke_limited++;
 		return (0);
 	}
 
diff --git a/bin/varnishtest/tests/r01764.vtc b/bin/varnishtest/tests/r01764.vtc
index 9f4e4cf..0dc1cb3 100644
--- a/bin/varnishtest/tests/r01764.vtc
+++ b/bin/varnishtest/tests/r01764.vtc
@@ -52,3 +52,5 @@ client c1 {
 	rxresp
 	expect resp.status == 503
 } -run
+
+varnish v1 -expect nuke_limited == 1


More information about the varnish-commit mailing list