Seafile Pro 7.1.3 : Failed to connect to MySQL

Hello,
In seafile.log, several times a day I get this error:

[05/11/2020 04:46:19 PM] ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (110)

do you have an idea ?

Thx

This error message can mean anything.
Permission correct?
Databases exist?
Firewall blocking SQL ports?

Not sure if the last one is even possible but not sure

I do not have more info … Seafile is working correctly however this message is probably not normal …

here is my seafile.log file for the last 48 hours.
if that can help you …
debian 10, MariaDB 10.4 … nginx …

[05/10/20 18:03:57] filelock-mgr.c(973): Cleaning expired file locks.
[05/10/20 18:14:02] start to serve on pipe client
[05/10/20 18:14:02] start to serve on pipe client
[05/10/20 18:14:04] start to serve on pipe client
[05/10/20 18:16:38] start to serve on pipe client
[05/10/20 18:19:27] start to serve on pipe client
[05/10/20 18:53:22] start to serve on pipe client
[05/10/20 19:03:57] filelock-mgr.c(973): Cleaning expired file locks.
[05/10/20 19:03:57] filelock-mgr.c(1003): 0 expired file locks are unlocked.
[05/10/20 19:06:57] filelock-mgr.c(1041): Cleaning expired OnlineOffice file locks.
[05/10/20 19:07:57] filelock-mgr.c(1041): Cleaning expired OnlineOffice file locks.
[05/10/20 20:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/10/20 21:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/10/20 22:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/10/20 23:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 00:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 01:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 02:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 03:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 04:03:58] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 05:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 06:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 07:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 08:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 09:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 10:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 11:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 12:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 13:03:59] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 14:04:00] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 15:04:00] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 16:04:00] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 17:04:00] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 18:04:00] filelock-mgr.c(973): Cleaning expired file locks.
[05/11/20 19:04:00] filelock-mgr.c(973): Cleaning expired file locks.

Thanks Cisco,
I have similar seafile.log, but 4 - 5x per day i have this line in middle …its weird

…/common/seaf-db.c(596): Failed to connect to MySQL: Can’t connect to MySQL server on ‘127.0.0.1’ (110)

I have the same problem. It doesn’t affect general Seafile usage (as far as I looked), but it’s breaking the FUSE mount point. I’m using seaf-fuse to backup my files, and this error breaks randomly file access through the FUSE mount point. In my logs :

mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (99)
mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/branch-mgr.c(575): [branch mgr] DB error when get branch master.
mai 26 19:35:39 seafile seaf-fuse[1908]: repo-mgr.c(340): Failed to get master branch of repo bf03c3d0.
mai 26 19:35:39 seafile seaf-fuse[1908]: repo-mgr.c(348): Repo bf03c3d0 is corrupted.
mai 26 19:35:39 seafile seaf-fuse[1908]: getattr.c(114): Failed to get repo bf03c3d0-045b-428a-b2d9-0036b7a1d2fe.
mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (99)
mai 26 19:35:39 seafile seaf-fuse[1908]: getattr.c(114): Failed to get repo bf03c3d0-045b-428a-b2d9-0036b7a1d2fe.
mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (99)
mai 26 19:35:39 seafile seaf-fuse[1908]: getattr.c(114): Failed to get repo bf03c3d0-045b-428a-b2d9-0036b7a1d2fe.
mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (99)
mai 26 19:35:39 seafile seaf-fuse[1908]: getattr.c(114): Failed to get repo bf03c3d0-045b-428a-b2d9-0036b7a1d2fe.
mai 26 19:35:39 seafile seaf-fuse[1908]: ../common/seaf-db.c(596): Failed to connect to MySQL: Can't connect to MySQL server on '127.0.0.1' (99)
mai 26 19:35:39 seafile seaf-fuse[1908]: getattr.c(114): Failed to get repo bf03c3d0-045b-428a-b2d9-0036b7a1d2fe.

MariaDB 10.4 too. There’s no network issue, as MariaDB is running on the same server. MariaDB is running fine

Seafile 7 to ?

Yes, seafile 7.1.4. But I think I found a workaround. Seams seafile is opening too many connections to the DB, until exhaustion (instead of reusing already opened connections). It seems to be OK if I set net.ipv4.tcp_tw_reuse and net.ipv4.tcp_tw_recycle to 1