[英]Error 32: Running multiple Django sites using 'python manage.py runserver' in Gunicorn-Nginx
I have some Django sites running on a Nginx-Gunicorn server. 我在Nginx-Gunicorn服务器上运行了一些Django网站。 But at some point I am getting Broken Pipe errors as below
但是在某些时候,我遇到了如下的管道破裂错误
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 582, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/root/djangoapps/env/mmiradio/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 143, in _init_
super(WSGIRequestHandler, self).__init__(*args, **kwargs)
File "/usr/lib/python2.7/SocketServer.py", line 640, in _init_
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 693, in finish
self.wfile.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
I have 'python manage.py runserver' in my gunicorn config for each site, so doubts whether that causes the problem ? 我在每个站点的gunicorn配置中都有“ python manage.py runserver”,因此怀疑是否会导致此问题? As official Django says NEVER use it on production server.
正如官方Django所说,切勿在生产服务器上使用它。
You are running two servers. 您正在运行两台服务器。 See here:
看这里:
https://docs.djangoproject.com/en/dev/ref/django-admin/#runserver-port-or-address-port
The runserver command is just a convenient little server for use in development. runserver命令只是用于开发的便捷小服务器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.