datamate-rethink-it / seafile-release

3 stars 1 forks source link

If the database is not reachable, seafile-server logs are misleading #39

Open christophdb opened 4 weeks ago

christophdb commented 4 weeks ago

How to reproduce:

install seafile and mariadb and make a mistake with DB_HOST. Then execute docker logs seafile-server. You will see as last entry:

2024-10-30 12:36:37 Reloading NGINX... 

This is misleading. There should be a log entry like: Try to connect to database...

simonhammes commented 3 weeks ago

This is caused by buffered I/O. It actually prints waiting for mysql server to be ready (https://github.com/haiwen/seafile-docker/blob/b5967dedf16acde7aa6feddb3dbd54f89162db6c/scripts/scripts_11.0/utils.py#L290), but the output is buffered.

2 solutions: