You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/07/21 17:18:38 UTC
[trafficserver] branch 9.1.x updated: Apply log throttling to
HTTP/2 session error rate messages (#7772)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 78a7df6 Apply log throttling to HTTP/2 session error rate messages (#7772)
78a7df6 is described below
commit 78a7df6eeed1ad2dbebf8e711129ab8d469c8641
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Thu May 6 12:02:23 2021 -0500
Apply log throttling to HTTP/2 session error rate messages (#7772)
These messages may become voluminous under certain circumstances.
Applying log throttling to them so they don't become too noisy.
(cherry picked from commit 5d58edc185f4801332847e4c84e916168964d750)
---
proxy/http2/Http2ClientSession.cc | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index de7034f..f55abf6 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -360,9 +360,10 @@ Http2ClientSession::main_event_handler(int event, void *edata)
Http2::stream_error_rate_threshold) { // For a case many stream errors happened
ip_port_text_buffer ipb;
const char *client_ip = ats_ip_ntop(get_remote_addr(), ipb, sizeof(ipb));
- Warning("HTTP/2 session error client_ip=%s session_id=%" PRId64
- " closing a connection, because its stream error rate (%f) exceeded the threshold (%f)",
- client_ip, connection_id(), this->connection_state.get_stream_error_rate(), Http2::stream_error_rate_threshold);
+ SiteThrottledWarning("HTTP/2 session error client_ip=%s session_id=%" PRId64
+ " closing a connection, because its stream error rate (%f) exceeded the threshold (%f)",
+ client_ip, connection_id(), this->connection_state.get_stream_error_rate(),
+ Http2::stream_error_rate_threshold);
Http2SsnDebug("Preparing for graceful shutdown because of a high stream error rate");
cause_of_death = Http2SessionCod::HIGH_ERROR_RATE;
this->connection_state.set_shutdown_state(HTTP2_SHUTDOWN_NOT_INITIATED, Http2ErrorCode::HTTP2_ERROR_ENHANCE_YOUR_CALM);
@@ -557,9 +558,10 @@ Http2ClientSession::state_process_frame_read(int event, VIO *vio, bool inside_fr
if (this->connection_state.get_stream_error_rate() > std::min(1.0, Http2::stream_error_rate_threshold * 2.0)) {
ip_port_text_buffer ipb;
const char *client_ip = ats_ip_ntop(get_remote_addr(), ipb, sizeof(ipb));
- Warning("HTTP/2 session error client_ip=%s session_id=%" PRId64
- " closing a connection, because its stream error rate (%f) exceeded the threshold (%f)",
- client_ip, connection_id(), this->connection_state.get_stream_error_rate(), Http2::stream_error_rate_threshold);
+ SiteThrottledWarning("HTTP/2 session error client_ip=%s session_id=%" PRId64
+ " closing a connection, because its stream error rate (%f) exceeded the threshold (%f)",
+ client_ip, connection_id(), this->connection_state.get_stream_error_rate(),
+ Http2::stream_error_rate_threshold);
err = Http2ErrorCode::HTTP2_ERROR_ENHANCE_YOUR_CALM;
}