原因:

最近开发的一个项目,由于有个更新job需要消耗的时间非常长,一度以为更新出现了错误。

 

经过:

于是打开debug模式测试, 异常开启,调试发现system返回了

writing to a closed pipe/socket/fd (probably the client disconnected) !!!

异常返回IO write()异常了

具体信息如下:

uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 296]

可以看出uwsgi的pipe broken掉了,因为只是接口,uwsgi default 60秒

所以其实是超时了uwsgi认为这个pipe client已经断开,uwsgi还在run,当job超过了60秒,就把他干掉了。

 

解决:

修改uwsgin.ini,增加http-time设置即可

https://uwsgi-docs.readthedocs.io/en/latest/Options.html#http-timeout

 

相关文章:

  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-01-20
猜你喜欢
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案