Hi again ;),
I am running Seafile 13 with Docker Compose using these services:
seafiledb(MariaDB)redisnotification-serverseadocmd-server
Problem
From time to time, the web UI becomes extremely slow and then shows errors like:
- “Page unavailable”
- “Sorry, but the requested page is unavailable due to a server hiccup…”
At the same time, md-server logs show messages such as:
ERROR 2002 (HY000): Can't connect to server on 'seafile.mysql' (115)WARNING Database initialization failed on attempt 1
Sometimes it recovers on its own after a few retries. However, if it remains in this problematic state, it does not recover by itself later even when the DB should already be ready. In those cases, I have to restart the containers manually.
Frequency
This only happens occasionally, maybe once every 2-3 months.
The same issue already occurred with Seafile v12, so it does not seem to be new in v13.
Workaround
What works for me is the following manual recovery sequence:
- Stop all containers manually
- Start only the database container first
- Wait a bit until MariaDB is fully ready
- Start the remaining containers
After that, everything works normally again.
A full recreate also works:
docker compose down
docker compose pull
docker compose up -d --force-recreate
My assumption
My guess is that this may be a startup or readiness issue:
depends_ononly controls container start order, not actual service readinessmd-servermay try to connect before MySQL/MariaDB is fully accepting connections- if startup enters this bad state, it seems not to recover automatically later even after the DB is ready
- once the services are started again with the DB already ready, the stack works normally
Questions
Could you please confirm:
- Is there a recommended way to make sure
md-serverandseafilewaits until the DB is actually ready? - Is this a known issue startup timing or DB retry behavior?
- Is there any official healthcheck or wait-for-db approach recommended for Seafile Docker Compose deployments?
Thanks a lot.