My colleague said he saw "
Database is overload" at the moodle web GUI when the incident happened.
The below is part of the mysqltuner result.
!!] Total fragmented tables: 3
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[!!] failed to execute: SELECT CONCAT(user, '@',
host) FROM mysql.user WHERE (IF(plugin='mysql_native_password', authentication_string, password) = '' OR IF(plugin='mysql_native_password', authentication_string, password) IS NULL) AND plugin NOT IN ('unix_socket', 'win_socket', 'auth_pam_compat')
[!!] FAIL Execute SQL / return code: 256
[OK] All database users have passwords assigned
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE CAST(IF(plugin='mysql_native_password', authentication_string, password) as Binary) = PASSWORD(user) OR CAST(IF(plugin='mysql_native_password', authentication_string, password) as Binary) = PASSWORD(UPPER(user)) OR CAST(IF(plugin='mysql_native_password', authentication_string, password) as Binary) = PASSWORD(CONCAT(UPPER(LEFT(User, 1)), SUBSTRING(User, 2, LENGTH(User))))
[!!] FAIL Execute SQL / return code: 256
[!!] User 'root@%' does not specify hostname restrictions.
[!!] There is no basic password file list!
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.2% (3M used / 16M cache)
[OK] Key buffer size / total MyISAM indexes: 16.0M/45.0K
[!!] Read Key buffer hit rate: 50.0% (6 cached / 3 reads)
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 28.0G/11.3G
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 3.4G * 2/28.0G should be equal to 25%
[OK] InnoDB buffer pool instances: 28
[--] Number of InnoDB Buffer Pool Chunk : 224 for 28 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.98% (1996259851 hits/ 1996626792 total)
[!!] InnoDB Write Log efficiency: 45.67% (889941 hits/ 1948635 total)
[OK] InnoDB log waits: 0.00% (0 waits / 1058694 writes)
General recommendations:
Control warning line(s) into /var/log/
mariadb/mariadb.log file
Control error line(s) into /var/log/mariadb/mariadb.log file
Run OPTIMIZE TABLE to defragment tables for better performance
OPTIMIZE TABLE `moodle`.`mdl_files`; -- can free 61 MB
OPTIMIZE TABLE `moodle`.`mdl_notifications`; -- can free 480 MB
OPTIMIZE TABLE `moodle`.`mdl_question_attempts`; -- can free 104 MB
Total freed space after theses OPTIMIZE TABLE : 645 Mb
Restrict Host for user@% to user@SpecificDNSorIp
Adjust your join queries to always utilize indexes
Variables to adjust:
join_buffer_size (> 320.0K, or always use indexes with JOINs)
Please advise if MySQL database is the cause of the problem. Thanks a lot.