[SOLVED] Seafile just stopped working?

I went to check my backups, make sure they are running, and for some reason I get errors in the webgui, as well as the client trying to back up to the seafile server. I look at the seahub_django_request.log and it throws these errors, after a restart, and a test/refresh from the client.

2018-04-27 21:06:12,930 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\handlers\base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\decorators\csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\generic\base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “C:\SeafileProgram\seahub\seahub\api2\base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “C:\SeafileProgram\seahub\seahub\api2\base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 378, in initial
self.check_throttles(request)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 340, in check_throttles
if not throttle.allow_request(request, self):
File “C:\SeafileProgram\seahub\seahub\api2\throttling.py”, line 123, in allow_request
self.history = self.cache.get(self.key, [])
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\cache\backends\filebased.py”, line 41, in get
if not self._is_expired(f):
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\cache\backends\filebased.py”, line 138, in _is_expired
exp = pickle.load(f)
EOFError
2018-04-27 21:06:13,569 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\handlers\base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\decorators\csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\views\generic\base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “C:\SeafileProgram\seahub\seahub\api2\base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “C:\SeafileProgram\seahub\seahub\api2\base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 378, in initial
self.check_throttles(request)
File “C:\SeafileProgram\seahub\thirdpart\djangorestframework-3.3.2-py2.7.egg\rest_framework\views.py”, line 340, in check_throttles
if not throttle.allow_request(request, self):
File “C:\SeafileProgram\seahub\seahub\api2\throttling.py”, line 123, in allow_request
self.history = self.cache.get(self.key, [])
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\cache\backends\filebased.py”, line 41, in get
if not self._is_expired(f):
File “C:\SeafileProgram\seahub\thirdpart\django-1.8.10-py2.7.egg\django\core\cache\backends\filebased.py”, line 138, in _is_expired
exp = pickle.load(f)
EOFError

That error is usually due to a cached file being null… IE, an empty cache file. Stop seafile and seahub, and delete the folder called seahub_cache located in /tmp. Then, restart Seafile and seahub. Let us know if that works.

/tmp/seahub_cache

2 Likes

Awesome, that fixed it.
Curious why it was full, as it was only a couple 1KB files. I also restarted/deleted, and it has the same amount of 1KB files back in the directory. But it is working again. Also, the directory path was:
C:\seafile-server\seahub_cache

Not full… Null… You had a file with nothing in it in the cache. It happens sometimes. Basically, that error message mentioned “EOFError”, which means “end of file”, which is unusual for a cache file, which I why I suggested you clear the cache. The files in seahub cache are not executable, as far as I know, and therefore, the only logical conclusion is that a cache file was completely empty.

Please add [SOLVED] to the beginning of the title. Thanks.

@shoeper - Can you mark the solution please?

thank you sir!

1 Like