Commit 16df092f authored by Dag Haavi Finstad's avatar Dag Haavi Finstad

Add ws_client_overflow counter

parent 34725484
......@@ -601,6 +601,13 @@
Number of times we ran out of space in workspace_backend.
.. varnish_vsc:: ws_client_overflow
:level: diag
:group: wrk
:oneliner: workspace_client overflows
Number of times we ran out of space in workspace_client.
.. varnish_vsc:: shm_records
:level: diag
:oneliner: SHM records
......
......@@ -191,6 +191,8 @@ Req_Rollback(struct req *req)
VCL_TaskLeave(req->vcl, req->privs);
VCL_TaskEnter(req->vcl, req->privs);
HTTP_Copy(req->http, req->http0);
if (WS_Overflowed(req->ws))
req->wrk->stats->ws_client_overflow++;
WS_Reset(req->ws, req->ws_req);
}
......@@ -242,6 +244,9 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
req->hash_ignore_busy = 0;
req->is_hit = 0;
if (WS_Overflowed(req->ws))
wrk->stats->ws_client_overflow++;
WS_Reset(req->ws, 0);
}
......
......@@ -273,6 +273,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
VSB_bcat(&resp, r, sz);
}
if (VSB_finish(&resp)) {
WS_MarkOverflow(req->ws);
// We ran out of workspace, return minimal 500
VSLb(req->vsl, SLT_Error, "workspace_client overflow");
VSLb(req->vsl, SLT_RespStatus, "500");
......
......@@ -69,3 +69,4 @@ client c1 {
logexpect l2 -wait
varnish v1 -expect client_resp_500 == 1
varnish v1 -expect ws_client_overflow == 2
......@@ -48,3 +48,4 @@ client c2 {
varnish v1 -expect client_resp_500 == 2
varnish v1 -expect ws_client_overflow == 2
......@@ -29,3 +29,4 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect client_resp_500 == 1
varnish v1 -expect ws_client_overflow == 1
......@@ -29,3 +29,4 @@ client c1 {
} -run
varnish v1 -expect client_resp_500 == 1
varnish v1 -expect ws_client_overflow == 1
......@@ -166,3 +166,4 @@ client c1 {
} -run
varnish v1 -expect client_resp_500 == 1
varnish v1 -expect ws_client_overflow == 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment