EOFError的解决办法

服务器经历了一次意外停电,重启后 运行:
./seafile.sh start
./seahub.sh start
控制台一切正常。
但访问SeafileClient和SeaDriver都无法正常使用。
查看seahub.log文件,发现以下异常:

2019-12-09 13:55:03,966 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/rest_framework/views.py”, line 378, in initial
self.check_throttles(request)
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/rest_framework/views.py”, line 340, in check_throttles
if not throttle.allow_request(request, self):
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/seahub/api2/throttling.py”, line 129, in allow_request
self.history = self.cache.get(self.key, [])
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py”, line 44, in get
if not self._is_expired(f):
File “/opt/modules/haiwen/seafile-server-7.0.5/seahub/thirdpart/django/core/cache/backends/filebased.py”, line 141, in _is_expired
exp = pickle.load(f)
EOFError

通过调试发现 /tmp/seahub_cache/43b472d9735b24b59fc61e61d5a98257.djcache 这个文件的异常。
解决办法:
删除 /tmp/seahub_cache/ 即可!