Server 6.1.1 stops when I sync

Hi,

I upgraded from Ubuntu 14.04 to 15.10, Seafile was also updated from 6.0.9 to 6.1.1
I don’t have any problem loading and downloading files from the browser.
However, when I connect using seafile client, my server stops working.
I need to restart MySQL and Seafile server again.
Android client is tested and it seems working fine.

Thanks,
Antonio

Here is the log file showing the issue, seafile.log has no output

seahub_django_request.log
2017-07-15 11:42:46,694 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/generic/base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 376, in initial
self.perform_authentication(request)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 310, in perform_authentication
request.user
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 353, in getattribute
return super(Request, self).getattribute(attr)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 193, in user
self._authenticate()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 316, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 63, in authenticate
ret = self.authenticate_v2(request, key)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 92, in authenticate_v2
token = TokenV2.objects.get(key=key)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/manager.py”, line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 328, in get
num = len(clone)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 144, in len
self._fetch_all()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 965, in _fetch_all
self._result_cache = list(self.iterator())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 238, in iterator
results = compiler.execute_sql()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/sql/compiler.py”, line 838, in execute_sql
cursor = self.connection.cursor()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 164, in cursor
cursor = self.make_cursor(self._cursor())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 135, in _cursor
self.ensure_connection()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/utils.py”, line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 119, in connect
self.connection = self.get_new_connection(conn_params)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/mysql/base.py”, line 276, in get_new_connection
conn = Database.connect(**conn_params)
File “/usr/lib/python2.7/dist-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 206, in init
super(Connection, self).init(*args, **kwargs2)
OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ (111)”)
2017-07-15 11:42:46,694 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/generic/base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 376, in initial
self.perform_authentication(request)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 310, in perform_authentication
request.user
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 353, in getattribute
return super(Request, self).getattribute(attr)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 193, in user
self._authenticate()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 316, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 63, in authenticate
ret = self.authenticate_v2(request, key)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 92, in authenticate_v2
token = TokenV2.objects.get(key=key)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/manager.py”, line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 328, in get
num = len(clone)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 144, in len
self._fetch_all()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 965, in _fetch_all
self._result_cache = list(self.iterator())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 238, in iterator
results = compiler.execute_sql()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/sql/compiler.py”, line 838, in execute_sql
cursor = self.connection.cursor()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 164, in cursor
cursor = self.make_cursor(self._cursor())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 135, in _cursor
self.ensure_connection()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/utils.py”, line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 119, in connect
self.connection = self.get_new_connection(conn_params)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/mysql/base.py”, line 276, in get_new_connection
conn = Database.connect(**conn_params)
File “/usr/lib/python2.7/dist-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 206, in init
super(Connection, self).init(*args, **kwargs2)
OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ (111)”)
2017-07-15 11:42:46,751 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/starredfiles/
Traceback (most recent call last):
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/views/generic/base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 376, in initial
self.perform_authentication(request)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 310, in perform_authentication
request.user
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 353, in getattribute
return super(Request, self).getattribute(attr)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 193, in user
self._authenticate()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 316, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 63, in authenticate
ret = self.authenticate_v2(request, key)
File “/opt/seafile/seafile-server-6.1.1/seahub/seahub/api2/authentication.py”, line 92, in authenticate_v2
token = TokenV2.objects.get(key=key)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/manager.py”, line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 328, in get
num = len(clone)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 144, in len
self._fetch_all()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 965, in _fetch_all
self._result_cache = list(self.iterator())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/query.py”, line 238, in iterator
results = compiler.execute_sql()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/models/sql/compiler.py”, line 838, in execute_sql
cursor = self.connection.cursor()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 164, in cursor
cursor = self.make_cursor(self._cursor())
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 135, in _cursor
self.ensure_connection()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/utils.py”, line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/base/base.py”, line 119, in connect
self.connection = self.get_new_connection(conn_params)
File “/opt/seafile/seafile-server-6.1.1/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/db/backends/mysql/base.py”, line 276, in get_new_connection
conn = Database.connect(**conn_params)
File “/usr/lib/python2.7/dist-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 206, in init
super(Connection, self).init(*args, **kwargs2)
OperationalError: (2003, “Can’t connect to MySQL server on ‘127.0.0.1’ (111)”)

I found out the solution. When I upgraded my Ubuntu from 14.04 to 16.04, there is a minimum requirement for MySQL innodb. Once my VM server was tiny (512MB RAM and no swap), MySQL server was being killed due out of memory (OOM).
Once I upgraded to 1GB RAM and added swap, Seafile is working fine again.