配置过程是:
安装cyrus-sasl-2.1.26_12.txz
安装memcached-1.4.25.txz
安装py27-python-memcached-1.57.txz
启daemon #service memcached start
conf/seahub_settings.py添加配置
CACHES = {
‘default’: {
‘BACKEND’: ‘django.core.cache.backends.memcached.MemcachedCache’,
‘LOCATION’: ‘127.0.0.1:11211’,
}
}
启动 seahub.sh start
测试发现:启用memcached后,http://xx.xx.xx.xx:8000/#groups/ 查看所有群组页面报错,部分群组页面可以正常查看,其余报错。
日志 seahub_django_request.log
2016-05-17 12:53:43,331 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api/v2.1/groups/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:53:46,239 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/groups/2/repos/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:53:48,526 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/groups/2/repos/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:53:50,116 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/groups/2/repos/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:53:51,485 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api/v2.1/groups/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:54:08,176 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:54:16,186 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:54:19,297 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/public/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:55:41,332 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api/v2.1/groups/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:57:07,823 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)
2016-05-17 12:57:16,188 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 164, in get_response
response = response.render()
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/template/response.py”, line 158, in render
self.content = self.rendered_content
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/response.py”, line 71, in rendered_content
ret = renderer.render(self.data, media_type, context)
File “/haiwen/seafile-server-5.1.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/renderers.py”, line 104, in render
separators=separators
File “/usr/local/lib/python2.7/json/init.py”, line 251, in dumps
sort_keys=sort_keys, **kw).encode(obj)
File “/usr/local/lib/python2.7/json/encoder.py”, line 210, in encode
return ‘’.join(chunks)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe7 in position 1: ordinal not in range(128)