-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
twirp error unknown: failed to write response, 0 of 59 bytes written: http: Handler timeout #5
Comments
@lvht 大佬请帮看下 |
这个 |
请求这个url |
@andyjia 我搞糊涂了。我自己本地设了 |
你的 postman 的请求超时时间是不是设太短了。你先用 curl 直接调试试。 |
curl结果也是有时正常,有时timeout |
还有就是你的代码要一路传递 |
大佬真牛!这样设置就好了,我这个是remote的数据库。 |
是这样的操作么?(最开始这样搞的,出错了乱试着改了。context没理解透彻。) |
对,ctx 用于超时控制,要一路传递的。 |
领悟了~谢谢指导~ |
@lvht func (s *Server) Read(ctx context.Context, req *pb.ReadRequest) (*pb.ReadResponse, error) { |
解决了。我curl post方法的问题(json内容大小写区分)。抱歉打扰了。
|
谢谢提供的链接,谢谢大佬指导! |
起这么早,少见 |
下一步我引入jwt试试 |
写个 hook 就好了 |
获取数据并返回Todo的对象的json的代码块
程序执行结果的部分,todo和resp的结果都OK,write response时提示超时的错误信息。
service.twirp.go的代码出现的错误
函数:serveReadForm
The text was updated successfully, but these errors were encountered: