django - 请求任何 url 时 Django 出错

标签 django centos django-dev-server

我在 Django 的开发服务器上运行 Django。之前它工作正常,但从昨天开始,我不断在运行服务器的 linux 命令行上收到此错误。

Exception happened during processing of request from ('57.xx.xx.123', 63721)
Traceback (most recent call last):
  File "/opt/python27/lib/python2.7/SocketServer.py", line 284, in _handle_reque                                                                             st_noblock
    self.process_request(request, client_address)
  File "/opt/python27/lib/python2.7/SocketServer.py", line 310, in process_reque                                                                             st
    self.finish_request(request, client_address)
  File "/opt/python27/lib/python2.7/SocketServer.py", line 323, in finish_reques                                                                             t
    self.RequestHandlerClass(request, client_address, self)
  File "/opt/python27/lib/python2.7/site-packages/django/core/servers/basehttp.p                                                                             y", line 570, in __init__
    BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
  File "/opt/python27/lib/python2.7/SocketServer.py", line 641, in __init__
    self.finish()
  File "/opt/python27/lib/python2.7/SocketServer.py", line 694, in finish
    self.wfile.flush()
  File "/opt/python27/lib/python2.7/socket.py", line 301, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

谁能告诉我为什么它现在开始发生

10 次中只有 1 次发生这种情况

最佳答案

“损坏的管道”意味着当目标关闭时,文件描述符(在本例中为套接字)上仍有传出数据。

在这种情况下,最可能的原因是浏览器在 Django 开发服务器发送完整响应之前关闭了连接。

关于django - 请求任何 url 时 Django 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6592815/

相关文章:

Django - 使用 pdb 交互式调试 wsgi 运行应用程序

django - 在 Django 中使用 markdown :"safe"会出现语法错误

python - 有没有一种简单的方法来检查查询集中的所有属性是否具有相同的值?

linux - 在 CentOS 6.2 上更新 GCC

python - Django 集成开发环境 : how to start the devserver in an editor?

django - 在 Django 中为开发和生产提供不同的静态文件

python - 自动加载 Django Fixture

javascript - bootstrap.min.js 3.0.0 中缺少 jQuery

file - 文件的修改日期是否表明该文件已被lighttpd使用?

Linux:当硬盘空间不足时如何接收来自服务器的警告电子邮件?