- Edited
Again thank you for your support.
Could you please help me to change the "Maximum possible memory usage: 6.2G" to below 2GB. I have only 2GB RAM.
>>>>>Are you using MyISAM tables?
No, all WordPress sites use InnoDB tables.
>>>There must be something in the logs to have some hint on what went wrong.
Today error log file is empty. Still, I didn't receive any corn failed email. I have little suspect about monit (it may restart MySQL when it uses high memory).
This is my mysqltuner output.
MySQLTuner 1.8.1 - Major Hayden major@mhtx.net
Bug reports, feature requests, and downloads at http://mysqltuner.pl/
Run with '--help' for additional options and output filtering[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials passed on the command line
[OK] Currently running supported MySQL version 10.5.12-MariaDB-1:10.5.12+mariafocal-log
[OK] Operating on 64-bit architecture-------- Log file Recommendations ------------------------------------------------------------------
[OK] Log file /var/log/mysql/error.log exists
[--] Log file: /var/log/mysql/error.log(0B)
[--] Log file /var/log/mysql/error.log is empty. Assuming log-rotation. Use --server-log={file} for explicit file-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
[--] Data in InnoDB tables: 138.8M (Tables: 407)
[--] Data in MyISAM tables: 4.6M (Tables: 2)
[OK] Total fragmented tables: 0-------- 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
[OK] All database users have passwords assigned
[!!] There is no basic password file list!-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 23h 32m 3s (492K q [5.814 qps], 6K conn, TX: 2G, RX: 111M)
[--] Reads / Writes: 80% / 20%
[--] Binary logging is disabled
[--] Physical Memory : 1.9G
[--] Max MySQL memory : 6.2G
[--] Other process memory: 0B
[--] Total buffers: 644.0M global + 71.5M per thread (80 max threads)
[--] P_S Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[!!] Maximum reached memory usage: 2.4G (126.13% of installed RAM)
[!!] Maximum possible memory usage: 6.2G (320.71% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (0/492K)
[OK] Highest usage of available connections: 32% (26/80)
[OK] Aborted connections: 0.65% (40/6144)
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 23K sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 4% (11K on disk / 277K total)
[OK] Thread cache hit rate: 99% (31 created / 6K connections)
[OK] Table cache hit rate: 99% (213K hits / 213K requests)
[OK] table_definition_cache(700) is upper than number of tables(602)
[OK] Open file limit used: 0% (62/500K)
[OK] Table locks acquired immediately: 100% (1K immediate / 1K locks)-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is disabled.
[--] Memory used by P_S: 0B
[--] Sys schema isn't installed.-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is enabled.
[--] Thread Pool Size: 1 thread(s).
[--] Using default value is good enough for your version (10.5.12-MariaDB-1:10.5.12+mariafocal-log)-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.2% (24M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/1.3M-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 256.0M/138.8M
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 74.0M * 1/256.0M should be equal to 25%
[--] Number of InnoDB Buffer Pool Chunk : 2 for 1 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.94% (11404902 hits/ 11411464 total)
[!!] InnoDB Write Log efficiency: 711.71% (30383 hits/ 4269 total)
[OK] InnoDB log waits: 0.00% (0 waits / 34652 writes)-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/336.0K
[!!] Aria pagecache hit rate: 83.1% (64K cached / 10K reads)-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: OFF
[--] Semi synchronous replication Slave: OFF
[--] This is a standalone server-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
MySQL was started within the last 24 hours - recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Dedicate this server to your database for highest performance.
Performance schema should be activated for better diagnostics
Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL
Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
performance_schema = ON enable PFS