4

错误 :

Rendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed" debug_error_string = "{"created":"@1576780304.349820911","description":"Error received from peer ipv4:104.155.6.79:443","file":"src/core/lib/surface/call.cc","file_line":1046,"grpc_message":"Socket closed","grpc_status":14}

此错误的文档说:The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff.

我发现可用的退避 GRPC ARGS是:

grpc.initial_reconnect_backoff_ms
grpc.max_reconnect_backoff_ms
grpc.min_reconnect_backoff_ms

默认情况下,这些 args 似乎具有这些值

#define GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS 1
#define GRPC_SUBCHANNEL_RECONNECT_MIN_TIMEOUT_SECONDS 20
#define GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS 120

你怎么知道退避会重试多少次?它是否链接到“grpc.enable_retries”?因为文档提到了“透明重试”,我不确定它是否与退避选项有关。

处理代码 14 错误的正确方法是什么?

4

0 回答 0