I added 50,000 email accounts with API on my server.
Everything works fine, but after restarting mailcow, SOGO does not want to start.
I get a WARN received SIGTERM after it starts doing "Updating _sogo_static_view content…'
SOGO successfully rebooted in a couple of minutes when there were 30,000-40,000 accounts on the server
Centos 7 , CPU 8 Cores @ 34% MEMORY 23.39GB @ 16% Disk usage: (1%)
sogo-mailcow-1 | Uptime: 2282 Threads: 17 Questions: 132043 Slow queries: 10 Opens: 65 Open tables: 58 Queries per second avg: 57.862
sogo-mailcow-1 | [2024-02-18T18:37:11.855612] WARNING: With use-dns(no), dns-cache() will be forced to 'no' too!;
sogo-mailcow-1 | Feb 18 18:37:11 5e71fbbbdc3e syslog-ng[8]: syslog-ng starting up; version='3.28.1'
sogo-mailcow-1 | DB schema is 09022024_1433
sogo-mailcow-1 | We are master, preparing sogo_view...
sogo-mailcow-1 | 2024-02-18 18:37:12,859 INFO success: processes entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
sogo-mailcow-1 | 2024-02-18 18:37:12,859 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
sogo-mailcow-1 | 2024-02-18 18:37:12,859 INFO success: bootstrap-sogo entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
sogo-mailcow-1 | We are master, preparing _sogo_static_view...
sogo-mailcow-1 | Updating _sogo_static_view content...
sogo-mailcow-1 | 2024-02-18 18:43:33,819 WARN received SIGTERM indicating exit request
sogo-mailcow-1 | 2024-02-18 18:43:33,821 INFO waiting for processes, syslog-ng, bootstrap-sogo to die
sogo-mailcow-1 | 2024-02-18 18:43:34,823 INFO stopped: bootstrap-sogo (terminated by SIGTERM)
sogo-mailcow-1 | Feb 18 18:43:34 5e71fbbbdc3e syslog-ng[8]: syslog-ng shutting down; version='3.28.1'
sogo-mailcow-1 | 2024-02-18 18:43:34,933 INFO stopped: syslog-ng (exit status 0)
sogo-mailcow-1 | 2024-02-18 18:43:34,934 INFO stopped: processes (terminated by SIGTERM)
There is nothing in the mysql logs
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] Starting MariaDB 10.5.24-MariaDB-1:10.5.24+maria~ubu2004 source revision 01f6abd1d4a929ee308f5b9287ac797a2e40d2b0 as process 1
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Uses event mutexes
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Number of pools: 1
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Using Linux native AIO
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Initializing buffer pool, total size = 536870912, chunk size = 134217728
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Completed initialization of buffer pool
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: 128 rollback segments are active.
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: 10.5.24 started; log sequence number 346394278; transaction id 881976
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] Plugin 'FEEDBACK' is disabled.
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] Server socket created on IP: '::'.
mysql-mailcow-1 | 2024-02-18 17:59:09 1 [Note] Event Scheduler: scheduler thread started with id 1
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] mysqld: ready for connections.
mysql-mailcow-1 | Version: '10.5.24-MariaDB-1:10.5.24+maria~ubu2004' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
mysql-mailcow-1 | 2024-02-18 17:59:09 0 [Note] InnoDB: Buffer pool(s) load completed at 240218 17:59:09
i found, that problem in bootstrap-sogo.sh
it seems that mysql does not have time to execute the query, and after 6 minutes it receives a SIGTERM signal
echo "Updating _sogo_static_view content..."
# If changed, also update init_db.inc.php
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -B -e "REPLACE INTO _sogo_static_view (c_uid, domain, c_name, c_password, c_cn, mail, aliases, ad_aliases, ext_acl, kind, multiple_bookings) SELECT c_uid, domain, c_name, c_password, c_cn, mail, aliases, ad_aliases, ext_acl, kind, multiple_bookings from sogo_view;"
I can’t find any way to increase TIMEOUT to give more time to process the request. If that’s the problem, of course.