egg
egg copied to clipboard
ctx.app.curl 请求,为何偶尔会出现请求中断的情况
目前,使用ctx.app.curl 请求.net写的接口,偶尔出现500的错误,然后根据对方的日志查询,发现,我这边发出去的请求,然后自己中断了,这种情况常常会出现,写了try catch 这部分的请求代码,但是偶尔还是会出现500的错误,这是为什么呢?
Translation of this issue:
ctx.app.curl request why occasional request interruptions occur
Currently, using ctx.app.curl to request an .NET write interface, an occasional 500 error occurs. Then, according to the other party's log query, it is found that the request sent by me is sent out, and then it is interrupted. This situation often occurs. Write a try catch this part of the request code, but occasionally there will be 500 errors, which is why?
Maybe nginx or other proxy server return 500, you should check by yourself.