Length mismatch in the column name table_name. Please run mysql_upgrade error with seafile pro docker latest version, assistance needed please

In December I upgraded the Seafile Pro server from version 6 to the latest 9.0.13 version.
After a lot of struggle it seemed as its working fine. Users started complaining yesterday that they get unknown error on libraries.

When I look at the docker-compose logs -f I see this error all the time.

seafile-mysql | 2023-01-10 11:17:04 15 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade

On the user logs I see these errors:

[01/10/23 07:21:52] sync-mgr.c(582): Repo ‘My Library’ sync state transition from ‘synchronized’ to ‘committing’.
[01/10/23 07:21:52] repo-mgr.c(3842): All events are processed for repo 0045b456-13f5-4f22-a699-942aa48fe8be.
[01/10/23 07:21:52] sync-mgr.c(582): Repo ‘My Library’ sync state transition from ‘committing’ to ‘initializing’.
[01/10/23 07:21:53] sync-mgr.c(582): Repo ‘Electra Mining 2018’ sync state transition from ‘synchronized’ to ‘committing’.
[01/10/23 07:21:53] repo-mgr.c(3842): All events are processed for repo f9dde04a-93dc-4c79-bf2d-758fd6fda443.
[01/10/23 07:21:53] sync-mgr.c(582): Repo ‘Electra Mining 2018’ sync state transition from ‘committing’ to ‘initializing’.
[01/10/23 07:21:54] sync-mgr.c(582): Repo ‘Engineering’ sync state transition from ‘synchronized’ to ‘committing’.
[01/10/23 07:22:05] repo-mgr.c(3842): All events are processed for repo 784a461b-bf8d-4ee0-8904-3e154c6689e4.
[01/10/23 07:22:05] sync-mgr.c(582): Repo ‘Engineering’ sync state transition from ‘committing’ to ‘initializing’.
[01/10/23 07:22:05] sync-mgr.c(881): Removing blocks for repo Engineering(784a461b).
[01/10/23 07:22:05] sync-mgr.c(582): Repo ‘ARVALV’ sync state transition from ‘synchronized’ to ‘committing’.
[01/10/23 07:22:07] repo-mgr.c(3842): All events are processed for repo b428a864-22e6-45a6-b2fe-e24d43ccbac0.
[01/10/23 07:22:07] sync-mgr.c(582): Repo ‘ARVALV’ sync state transition from ‘committing’ to ‘initializing’.
[01/10/23 09:40:03] clone-mgr.c(680): Transition clone state for 52829beb from [init] to [check server].
[01/10/23 09:40:04] clone-mgr.c(680): Transition clone state for 52829beb from [check server] to [fetch].
[01/10/23 09:40:04] http-tx-mgr.c(1157): Transfer repo ‘52829beb’: (‘normal’, ‘init’) → (‘normal’, ‘check’)
[01/10/23 09:40:04] http-tx-mgr.c(1157): Transfer repo ‘52829beb’: (‘normal’, ‘check’) → (‘normal’, ‘commit’)
[01/10/23 09:40:04] http-tx-mgr.c(1157): Transfer repo ‘52829beb’: (‘normal’, ‘commit’) → (‘normal’, ‘fs’)
[01/10/23 09:40:04] http-tx-mgr.c(4010): Bad response code for GET https://cloud.xxxxxx.net/seafhttp/repo/52829beb-fde9-46a6-9ffa-a1c45f46f695/fs-id-list/?server-head=207fee66f1b56441a7ecf7881325bdcc13e7341b: 447.
[01/10/23 09:40:04] http-tx-mgr.c(4580): Failed to get fs id list for repo 52829beb on server https://cloud.xxxxxx.net.
[01/10/23 09:40:04] http-tx-mgr.c(1157): Transfer repo ‘52829beb’: (‘normal’, ‘fs’) → (‘error’, ‘finished’)
[01/10/23 09:40:04] clone-mgr.c(697): Transition clone state for 52829beb from [fetch] to [error]: Unknown error.

In my docker-compose.yml the db shows as :

services:
db:
image: mariadb:10.5

Does anyone know if I should run a newer mariadb or what the issue actually is. I appreciate any assistance on the matter.

Thank you

This happens before the mismatch error :

seafile | Seafile server started
seafile |
seafile | Done.
seafile |
seafile | Starting seahub at port 8000 …
seafile |
seafile | Seahub is started
seafile |
seafile | Done.
seafile |
seafile-mysql | 2023-01-10 12:49:42+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.18+maria~ubu2004 started.
seafile-mysql | 2023-01-10 12:49:42+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
seafile-mysql | 2023-01-10 12:49:42+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.18+maria~ubu2004 started.
seafile-mysql | 2023-01-10 12:49:42+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required
seafile-mysql | 2023-01-10 12:49:42+00:00 [Note] [Entrypoint]: MariaDB upgrade (mysql_upgrade) required, but skipped due to $MARIADB_AUTO_UPGRADE setting
seafile-mysql | 2023-01-10 12:49:42 0 [Note] mysqld (mysqld 10.5.18-MariaDB-1:10.5.18+maria~ubu2004) starting as process 1 …
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Uses event mutexes
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Number of pools: 1
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
seafile-mysql | 2023-01-10 12:49:42 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Using Linux native AIO
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Completed initialization of buffer pool
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: 128 rollback segments are active.
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Creating shared tablespace for temporary tables
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: 10.5.18 started; log sequence number 5350497193; transaction id 211420078
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
seafile-mysql | 2023-01-10 12:49:42 0 [Note] Plugin ‘FEEDBACK’ is disabled.
seafile-mysql | 2023-01-10 12:49:42 0 [Note] Server socket created on IP: ‘::’.
seafile-mysql | 2023-01-10 12:49:42 0 [Warning] ‘proxies_priv’ entry ‘@% root@d5db42d293a2’ ignored in --skip-name-resolve mode.
seafile-mysql | 2023-01-10 12:49:42 0 [ERROR] Incorrect definition of table mysql.event: expected column ‘sql_mode’ at position 14 to have type set(‘REAL_AS_FLOAT’,‘PIPES_AS_CONCAT’,‘ANSI_QUOTES’,‘IGNORE_SPACE’,‘IGNORE_BAD_TABLE_OPTIONS’,‘ONLY_FULL_GROUP_BY’,‘NO_UNSIGNED_SUBTRACTION’,‘NO_DIR_IN_CREATE’,‘POSTGRESQL’,‘ORACLE’,‘MSSQL’,‘DB2’,‘MAXDB’,‘NO_KEY_OPTIONS’,‘NO_TABLE_OPTIONS’,‘NO_FIELD_OPTIONS’,‘MYSQL323’,‘MYSQL40’,‘ANSI’,‘NO_AUTO_VALUE_ON_ZERO’,‘NO_BACKSLASH_ESCAPES’,‘STRICT_TRANS_TABLES’,‘STRICT_ALL_TABLES’,‘NO_ZERO_IN_DATE’,‘NO_ZERO_DATE’,‘INVALID_DATES’,‘ERROR_FOR_DIVISION_BY_ZERO’,‘TRADITIONAL’,‘NO_AUTO_CREATE_USER’,‘HIGH_NOT_PRECEDENCE’,‘NO_ENGINE_SUBSTITUTION’,‘PAD_CHAR_TO_FULL_LENGTH’,‘EMPTY_STRING_IS_NULL’,‘SIMULTANEOUS_ASSIGNMENT’), found type set(‘REAL_AS_FLOAT’,‘PIPES_AS_CONCAT’,‘ANSI_QUOTES’,‘IGNORE_SPACE’,‘IGNORE_BAD_TABLE_OPTIONS’,‘ONLY_FULL_GROUP_BY’,‘NO_UNSIGNED_SUBTRACTION’,‘NO_DIR_IN_CREATE’,‘POSTGRESQL’,‘ORACLE’,‘MSSQL’,‘DB2’,‘MAXDB’,‘NO_KEY_OPTIONS’,‘NO_TABLE_OPTIONS’,‘NO_FIELD_OPTIONS’,‘MYSQL323’,‘MYSQL40’,‘ANSI’,'NO_AUTO_VALU
seafile-mysql | 2023-01-10 12:49:42 0 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
seafile-mysql | 2023-01-10 12:49:42 1 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:42 1 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:42 0 [Note] Reading of all Master_info entries succeeded
seafile-mysql | 2023-01-10 12:49:42 0 [Note] Added new Master_info ‘’ to hash table
seafile-mysql | 2023-01-10 12:49:42 0 [Note] mysqld: ready for connections.
seafile-mysql | Version: ‘10.5.18-MariaDB-1:10.5.18+maria~ubu2004’ socket: ‘/run/mysqld/mysqld.sock’ port: 3306 mariadb.org binary distribution
seafile-mysql | 2023-01-10 12:49:42 0 [Note] InnoDB: Buffer pool(s) load completed at 230110 12:49:42
seafile-mysql | 2023-01-10 12:49:43 3 [Warning] Aborted connection 3 to db: ‘unconnected’ user: ‘seafile’ host: ‘172.25.0.5’ (Got an error reading communication packets)
seafile-mysql | 2023-01-10 12:49:43 4 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 4 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 4 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 4 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 4 [Warning] Aborted connection 4 to db: ‘seafile_db’ user: ‘seafile’ host: ‘172.25.0.5’ (Got an error reading communication packets)
seafile-mysql | 2023-01-10 12:49:43 5 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 5 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
seafile-mysql | 2023-01-10 12:49:43 5 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade

I seem to have fixed the mismatch issue by logging into the seafile-mysql container and running mysql_upgrade.

But the problem on the users still exists with the same error.

[01/10/23 09:40:04] http-tx-mgr.c(4010): Bad response code for GET https://cloud.xxxxxx.net/seafhttp/repo/52829beb-fde9-46a6-9ffa-a1c45f46f695/fs-id-list/?server-head=207fee66f1b56441a7ecf7881325bdcc13e7341b: 447.
[01/10/23 09:40:04] http-tx-mgr.c(4580): Failed to get fs id list for repo 52829beb on server https://cloud.xxxxxx.net.
[01/10/23 09:40:04] http-tx-mgr.c(1157): Transfer repo ‘52829beb’: (‘normal’, ‘fs’) → (‘error’, ‘finished’)
[01/10/23 09:40:04] clone-mgr.c(697): Transition clone state for 52829beb from [fetch] to [error]: Unknown error.

after updating the client software of one of the users the unknown error changed to library to large to sync.

Added the following to the seafile.conf

[fileserver]
max_sync_file_count = 1000000
fs_id_list_request_timeout = 600