chttp2_{server,transport}: Downgrade two error log lines (#26948)

Currently when a gRPC server that uses a memory limit is under memory pressure, these lines can cause a large number of ERROR log lines to be written, each of which requires a flush.

From upstream cl/389641168.
pull/27027/head
Craig Tiller 4 years ago committed by GitHub
parent 58d3161aac
commit e26a4b19ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  2. 2
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc

@ -762,7 +762,7 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp,
!grpc_resource_user_safe_alloc(resource_user,
GRPC_RESOURCE_QUOTA_CHANNEL_SIZE)) {
gpr_log(
GPR_ERROR,
GPR_INFO,
"Memory quota exhausted, rejecting connection, no handshaking.");
} else {
// This ref needs to be taken in the critical region after having made

@ -773,7 +773,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t,
if (t->resource_user != nullptr &&
!grpc_resource_user_safe_alloc(t->resource_user,
GRPC_RESOURCE_QUOTA_CALL_SIZE)) {
gpr_log(GPR_ERROR, "Memory exhausted, rejecting the stream.");
gpr_log(GPR_INFO, "Memory exhausted, rejecting the stream.");
grpc_chttp2_add_rst_stream_to_next_write(t, id, GRPC_HTTP2_REFUSED_STREAM,
nullptr);
grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_RST_STREAM);

Loading…
Cancel
Save