go
network_error
ai_generated
true
rpc 错误:代码 = 不可用,描述 = grpc:服务器已停止
rpc error: code = Unavailable desc = grpc: the server has been stopped
ID: go/grpc-server-shutdown
80%修复率
86%置信度
0证据数
2024-05-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 1.60.0 | active | — | — | — |
根因分析
客户端尝试与已优雅停止或正在关闭的 gRPC 服务器通信。
English
The client attempted to communicate with a gRPC server that has been gracefully stopped or is in the process of shutting down.
解决方案
-
85% 成功率
Implement client-side health checks to detect server availability and reconnect when it comes back.
-
90% 成功率
Use a connection pool that can re-establish connections after server restart.
无效尝试
常见但无效的做法:
- 80% 失败
- 60% 失败