[英]Django is sooo slow? errno 32 broken pipe? dcramer-django-sentry-? static folder?
我一直在 Ubuntu 10.10 上使用 Django 1.3 和 Python 2.6。 我有 3 个问题。
当我通过127.0.0.1:8000
访问 Django 时,在开始一个全新的项目后,我可以到达该站点,但有时需要 10-20 秒,有时甚至更长时间才能到达。 此外,在我几乎没有参与过的项目中,我遇到了同样的问题,并且还遇到了以下错误:
Exception happened during processing of request from ('127.0.0.1', 47758)
Traceback (most recent call last):
File "/usr/lib/python2.6/SocketServer.py", line 283, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 309, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/servers/basehttp.py", line 570, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "/usr/lib/python2.6/SocketServer.py", line 618, in __init__
self.finish()
File "/usr/lib/python2.6/SocketServer.py", line 661, in finish
self.wfile.flush()
File "/usr/lib/python2.6/socket.py", line 297, in flush
self._sock.sendall(buffer(data, write_offset, buffer_size))
error: [Errno 32] Broken pipe
此外,每当我收到错误时,我希望dcramer 的 django-sentry将错误记录在数据库中,但是当我将 go 放入 MySQL 并检查表格时,那里什么也没有。 我按照网站上的说明安装了该应用程序。
我把它放在我的 urls.py 文件中:
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/user/apache2/www/django/ecomstore/static',})
但是,当我 go 到127.0.0.1:8000/static/css.css
8CBA22E28EB17B5F5C6AE2A266AZ 时,我找不到放在文件夹中的文件。 我做错了什么?
感谢所有的帮助!
这个问题也在这里讨论Django + WebKit = Broken pipe
这些错误是客户端在有机会完全发送所有数据之前关闭连接(我相信)。
堆栈的某些区域,这是其中之一,Sentry 目前无法记录异常。 我们希望在 Sentry 2.0 中改进这一点。
/您是否在设置中设置了 STATIC_URL = '/static/'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.