Apache + mod_wsgi + Flask 应用程序:“无法为请求获取bucket brigade"日志中的错误 [英] Apache + mod_wsgi + flask app: "Unable to get bucket brigade for request" error in logs

查看:31
本文介绍了Apache + mod_wsgi + Flask 应用程序:“无法为请求获取bucket brigade"日志中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 apache2/mod_wsgi/flask/python2.7 应用程序.有时这样的行会出现在日志文件中:

I have a apache2/mod_wsgi/flask/python2.7 app. Sometimes such line appears in log file:

Partial results are valid but processing is incomplete: [client 45.132.96.124:34500] mod_wsgi (pid=13920): Unable to get bucket brigade for request., referer: https://my-site.com/some_url/

什么是bucket brigade"?这个错误究竟意味着什么?是 apache 错误还是 wsgi 服务器错误?是什么导致了这个错误?如果这是一些未处理的异常 - 如何处理它以及在哪里处理?

What is "bucket brigade" and what this error actually means? Is it apache error or wsgi server error? What does lead to this error? If this is some unhandled exception - how to handle it and where?

提前致谢.

推荐答案

这通常意味着发出请求的 HTTP 客户端在请求内容可以全部读取之前断开了连接.如果您正在处理移动电话网络上的慢速客户端,这种情况并不少见.

It usually means that the HTTP client making the request dropped the connection before the request content could all be read. If you are dealing with slow clients on mobile phone networks, it is not uncommon to see this.

至于您是否可以处理它以便忽略它并且不记录任何内容,我需要查看错误消息的完整上下文以查看它是否与 IOError 异常一起生成Python.如果是,Python 代码可以捕获它并处理并返回 500 错误响应,但不会记录任何内容.

As to whether you can handle it so it is ignored and nothing logged, I would need to see the complete context of the error message to see whether it is generated in conjunction with an IOError exception in Python. If it is, the Python code could catch it and deal with and return a 500 error response but not log anything.

这篇关于Apache + mod_wsgi + Flask 应用程序:“无法为请求获取bucket brigade"日志中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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