报错1:rpc error:code=DeadlineExceeded desc = context deadline exceeded原因:客户端context超时时间小于服务端响应时间。解决:gRPC客户端建议显式指定超时时间,延长客户端超时时间。
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
posted on 2025-06-17 09:08 王景迁 阅读(99) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3