uwsgi:OSError:GET请求期间写入错误 [英] uwsgi: OSError: write error during GET request

查看:957
本文介绍了uwsgi:OSError:GET请求期间写入错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我长期放置应用程序时收到的错误日志.

Here is the error log that I received when I put my application in the long run.

Oct 22 11:41:18 uwsgi[4613]: OSError: write error
Oct 22 11:41:48 uwsgi[4613]: Tue Oct 22 11:41:48 2019 - uwsgi_response_write_body_do(): Broken pipe [core/writer.c line 341] during GET /api/events/system-alarms/ 
Nov 19 19:11:01 uwsgi[30627]: OSError: write error
Nov 19 19:11:02 uwsgi[30627]: Tue Nov 19 19:11:02 2019 - uwsgi_response_writev_headers_and_body_do(): Broken pipe [core/writer.c line 306] during GET /api/statistics/connected-clients/?type=auto&required_fields=0,11 

另外,我需要详细了解os写入错误的原因和管道损坏的情况.

Also, I need to know the reason for the os write error and a broken pipe in detail.

推荐答案

之前遇到过类似的问题,它发生在客户端发出请求然后关闭它时(由于服务器响应时间太长或客户端已经被破坏),但是uwsgi仍在处理该请求.

Faced a similar issue before, it happens when the client makes a request and then closes it (either because server took too long to respond or client has been disrupted) but uwsgi is still processing that request.

从标签中我注意到您正在使用nginx + uwsgi配置,有多种解决方法:

From the Tags I notice that you are using nginx+uwsgi configuration, there are multiple ways to solve this :

  • 查找最耗时的请求,并将其与nginx和 uwsgi(原秋).请注意,当客户端本身中断时,这将不起作用.
  • 在您的nginx配置上为uwsgi设置uwsgi_ignore_client_abort on 路线.
  • 或者您可以仅禁用写入错误日志记录 ignore-write-errors = true.
  • Find your most time consuming request and match it between nginx and uwsgi(harakiri). Note that this doesn't work when client itself disrupts.
  • On your nginx config set uwsgi_ignore_client_abort on for uwsgi routes.
  • Or you can just disable logging of write errors ignore-write-errors = true.

这篇关于uwsgi:OSError:GET请求期间写入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆