Error after login - Lost connection to MySQL server during query


I have got an error and no clue what causes this error.

  1. seafile server runs just fine
  2. seafdav works just fine
  3. sync also works fine

The problem ist the website. Once I try to log in I get the following error in seahub.log:

2018-12-04 17:25:02,714 [WARNING] django.request:152 get_response Not Found:   /media/assets/css/
2018-12-04 17:25:28,907 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /
Traceback (most recent call last):
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/core/handlers/", line 41, in inner
    response = get_response(request)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/core/handlers/", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/core/handlers/", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/core/handlers/", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/seahub/auth/", line 27, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/seahub/base/", line 39, in _decorated
    request.user.mods_enabled = get_enabled_mods_by_user(username)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/seahub/views/", line 22, in get_enabled_mods_by_user
    username=username, module_name=MOD_PERSONAL_WIKI).exists()
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/db/models/", line 670, in exists
    return self.query.has_results(using=self.db)
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/db/models/sql/", line 517, in has_results
    return compiler.has_results()
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/db/models/sql/", line 858, in has_results
    return bool(self.execute_sql(SINGLE))
  File "/var/lib/seafile/haiwen/seafile-server-6.3.4/seahub/thirdpart/Django-1.11.15-py2.7.egg/django/db/models/sql/", line 899, in execute_sql
    raise original_exception
OperationalError: (2013, 'Lost connection to MySQL server during query')

Here is my configuration:

SECRET_KEY = "xxxxxx"

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'private_seahub-db',
        'USER': 'root',
        'PASSWORD': 'xxxxxxx',
        'HOST': '',
        'PORT': '3306',
        'OPTIONS': {
            'init_command': 'SET storage_engine=INNODB',


EMAIL_HOST = ''              # smpt server
EMAIL_HOST_USER = ''    # username and domain
EMAIL_HOST_PASSWORD = 'xxxxxxx'         # password
SERVER_EMAIL = 'Seafile'


Can any help with this? I googled quite a while but I can’t find any seafile related issues?!

Thank you in advance

Maybe there is an problem with your MySQL Server or DB, you can check your DBs with the mysqlcheck command, look at:

And are you sure that all credentials are set correct?