Der*_*rek 9 python django performance
我一直在Ubuntu 10.10上使用Django 1.3和Python 2.6.我有3个问题.
当我访问Django via时127.0.0.1:8000
,在开始一个全新的项目后,我可以到达该网站,但有时它需要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
Run Code Online (Sandbox Code Playgroud)
此外,每当我收到错误时,我都希望dcramer的django-sentry在数据库中记录错误,但是当我进入MySQL并检查表时,那里什么都没有.我按照网站上的说明安装了应用程序.
我把它放在我的urls.py文件中:
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/user/apache2/www/django/ecomstore/static',})
Run Code Online (Sandbox Code Playgroud)但是,当我去的时候,127.0.0.1:8000/static/css.css
我找不到我放在文件夹中的文件.我做错了什么?
感谢您的帮助!
这些错误是客户端在有机会完全发送所有数据之前关闭连接(我相信)。
Sentry 当前无法记录堆栈中的某些区域(这就是其中之一)。我们希望在 Sentry 2.0 中改进这一点。