在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
go micro web端连接services时,第一次访问提示500(broken pipe),排查发现客户端请求services时返回 {"id":"go.micro.client","code":408,"detail":"call timeout: context deadline exceeded","status":"Request Timeout"} 修改micro client超时时间后没再出现过这种情况,待跟踪 具体修改: #service增加CallOption并设置超时时间 var opss client.CallOption = func(o *client.CallOptions) { o.RequestTimeout = time.Second * 30 o.DialTimeout = time.Second * 30 } func (VipService) GetTotalCash() (*vip.CashResponse, error) { return VipSrv.GetTotalCash(context.TODO(), &vip.CashRequest{}, opss) }
|
请发表评论