I have been using the seafile docker for many months without issue and then made the cardinal sin of fixing what wasn’t broken. ran a docker-compose pull, that went fine, it starts up without error. however trying to actually use seafile results in folders randomly saying they dont exist, files not loading, until eventually the server just dies and you get bad gateway.
i have tried running fsck, it did not report any found issues. There are some memory errors in some of the logs, although i have a lot of memory free on the host machine 7GB usually sitting unused, as well as an additional large swap partition empty (15GB) while its having issues. here are some of the errors in the logs
Seahub log:
2023-01-24 22:13:27,782 [ERROR] django.request:224 log_response Internal Server Error: /my-libs/
Traceback (most recent call last):
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/contrib/sessions/backends/base.py", line 233, in _get_session
return self._session_cache
AttributeError: 'SessionStore' object has no attribute '_session_cache'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/mysql/base.py", line 234, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.8/dist-packages/MySQLdb/__init__.py", line 123, in Connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 185, in __init__
super().__init__(*args, **kwargs2)
MySQLdb.OperationalError: (2005, "Unknown MySQL server host 'db' (-2)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/deprecation.py", line 116, in __call__
response = self.process_request(request)
File "/opt/seafile/seafile-server-9.0.10/seahub/seahub/auth/middleware.py", line 33, in process_request
if request.user.is_authenticated and not request.user.is_active:
File "/opt/seafile/seafile-server-9.0.10/seahub/seahub/auth/middleware.py", line 23, in __get__
request._cached_user = get_user(request)
File "/opt/seafile/seafile-server-9.0.10/seahub/seahub/auth/__init__.py", line 117, in get_user
username = request.session[SESSION_KEY]
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/contrib/sessions/backends/base.py", line 65, in __getitem__
return self._session[key]
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/contrib/sessions/backends/base.py", line 238, in _get_session
self._session_cache = self.load()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/contrib/sessions/backends/db.py", line 43, in load
s = self._get_session_from_db()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/contrib/sessions/backends/db.py", line 32, in _get_session_from_db
return self.model.objects.get(
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/query.py", line 431, in get
num = len(clone)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/query.py", line 262, in __len__
self._fetch_all()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/query.py", line 51, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/models/sql/compiler.py", line 1173, in execute_sql
cursor = self.connection.cursor()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 259, in cursor
return self._cursor()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 235, in _cursor
self.ensure_connection()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)
File "/opt/seafile/seafile-server-9.0.10/seahub/thirdpart/django/db/backends/mysql/base.py", line 234, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.8/dist-packages/MySQLdb/__init__.py", line 123, in Connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 185, in __init__
super().__init__(*args, **kwargs2)
django.db.utils.OperationalError: (2005, "Unknown MySQL server host 'db' (-2)")
Seafile log:
023-01-24 22:15:35 start to serve on pipe client
2023-01-24 22:15:36 start to serve on pipe client
2023-01-24 22:15:37 start to serve on pipe client
2023-01-24 22:15:38 start to serve on pipe client
2023-01-24 22:15:45 start to serve on pipe client
2023-01-24 22:16:02 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:02 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 repo-mgr.c(2168): Failed to get owner id for repo 76af523a-16c1-4b83-a31d-0422537b2079.
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:04 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:29 start to serve on pipe client
2023-01-24 22:16:45 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
2023-01-24 22:16:45 ../common/seaf-db.c(732): Failed to connect to MySQL: Can't create a new thread (errno 11 "Resource temporarily unavailable"); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
and here is my docker-compose
version: '2.0'
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD= # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /mnt/User Directory/Seafile/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- "8090:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /mnt/User Directory/Seafile/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD= # Requested, the value shuold be root's password of MySQL service.
- TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL= # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD= # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=seafile.kitsuna.net # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
networks:
- seafile-net
networks:
seafile-net:
I was unable to find any other useful logs, they either were empty or only had a short message saying they started. Please let me know of any additional information that might be helpful.