• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

grpc系列3-自定义端镜像GOAWAY with error code ENHANCE_YOUR_CALM and debug data equal to “too_many_pings“

武飞扬头像
愚昧之山绝望之谷开悟之坡
帮助1

客户端问题

E0806 11:12:22.190935590      29 chttp2_transport.cc:1113]   Received a GOAWAY with error code ENHANCE_YOUR_CALM and debug data equal to "too_many_pings"

参考

探针官方必须配置参数解释:https://grpc.github.io/grpc/core/md_doc_keepalive.html
所有配置参数表格:https://github.com/grpc/grpc/blob/v1.46.x/include/grpc/impl/codegen/grpc_types.h

解决方案

Why am I receiving a GOAWAY with error code ENHANCE_YOUR_CALM?
A server sends a GOAWAY with ENHANCE_YOUR_CALM if the client sends too many misbehaving pings as described in A8-client-side-keepalive.md. Some scenarios where this can happen are -
if a server has GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS set to false while the client has set this to true resulting in keepalive pings being sent even when there is no call in flight.
if the client's GRPC_ARG_KEEPALIVE_TIME_MS setting is lower than the server's GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS.

服务端还需要配置这两个参数

On the server-side, the following additional channel arguments need to be configured -

GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS
If there are no data/header frames being sent on the transport, this channel argument on the server side controls the minimum time (in milliseconds) that gRPC Core would expect between receiving successive pings. If the time between successive pings is less that than this time, then the ping will be considered a bad ping from the peer. Such a ping counts as a ‘ping strike’. On the client side, this does not have any effect.
GRPC_ARG_HTTP2_MAX_PING_STRIKES
This arg controls the maximum number of bad pings that the server will tolerate before sending an HTTP2 GOAWAY frame and closing the transport. Setting it to 0 allows the server to accept any number of bad pings.

由于 GRPC_ARG_KEEPALIVE_TIME_MS配置成了200000ms=200s,避免被识别成错误的探针,需要将
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS(默认是300s)设置成小于200s,可以配置成150s
学新通

学新通

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfiebef
系列文章
更多 icon
同类精品
更多 icon
继续加载