Commit a7686418 authored by Dag Haavi Finstad's avatar Dag Haavi Finstad Committed by Dridi Boukelmoune

Introduce RAPID_RESET as a sess_close reason

Conflicts:
	bin/varnishd/VSC_main.vsc
	include/tbl/sess_close.h
parent e5550939
......@@ -601,6 +601,14 @@
Number of session closes with Error VCL_FAILURE (VCL failure)
.. varnish_vsc:: sc_rapid_reset
:level: diag
:oneliner: Session Err RAPID_RESET
Number of times we failed an http/2 session because it hit its
configured limits for the number of permitted rapid stream
resets.
.. varnish_vsc:: client_resp_500
:level: diag
:group: wrk
......
......@@ -45,6 +45,7 @@
#include "vtcp.h"
#include "vtim.h"
#define H2_CUSTOM_ERRORS
#define H2EC1(U,v,r,d) const struct h2_error_s H2CE_##U[1] = {{#U,d,v,0,1,r}};
#define H2EC2(U,v,r,d) const struct h2_error_s H2SE_##U[1] = {{#U,d,v,1,0,r}};
#define H2EC3(U,v,r,d) H2EC1(U,v,r,d) H2EC2(U,v,r,d)
......@@ -339,7 +340,7 @@ h2_rapid_reset(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
Lck_Lock(&h2->sess->mtx);
VSLb(h2->vsl, SLT_Error, "H2: Hit RST limit. Closing session.");
Lck_Unlock(&h2->sess->mtx);
return (H2CE_ENHANCE_YOUR_CALM);
return (H2CE_RAPID_RESET);
}
h2->rst_budget -= 1.0;
return (0);
......
......@@ -54,3 +54,5 @@ client c1 {
barrier b2 sync
stream 0 -wait
} -run
varnish v1 -expect sc_rapid_reset == 1
......@@ -145,5 +145,17 @@ H2_ERROR(
/* descr */ "Use HTTP/1.1 for the request"
)
#ifdef H2_CUSTOM_ERRORS
H2_ERROR(
/* name */ RAPID_RESET,
/* val */ 11, /* ENHANCE_YOUR_CALM */
/* types */ 1,
/* reason */ SC_RAPID_RESET,
/* descr */ "http/2 rapid reset detected"
)
# undef H2_CUSTOM_ERRORS
#endif
#undef H2_ERROR
/*lint -restore */
......@@ -47,6 +47,7 @@ SESS_CLOSE(PIPE_OVERFLOW, pipe_overflow,1, "Session pipe overflow")
SESS_CLOSE(RANGE_SHORT, range_short, 1, "Insufficient data for range")
SESS_CLOSE(REQ_HTTP20, req_http20, 1, "HTTP2 not accepted")
SESS_CLOSE(VCL_FAILURE, vcl_failure, 1, "VCL failure")
SESS_CLOSE(RAPID_RESET, rapid_reset, 1, "HTTP2 rapid reset")
#undef SESS_CLOSE
/*lint -restore */
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