I seem to be having a crashing issue with mariadb. once every few days my wordpress websites aren't able to connect to the database and I noticed someone else was having this mariadb crashing issue as well
so I was hoping to get some help as to how I can optimize/troubleshoot the issue.
I saw someone recommending mysqltuner, so I would be curious if I could get some help optimizing mine for the hardware I'm using (2cpu cores 2gb ram, 2gb swap)
here's the output for mysqltuner. . .
`root@debian-2gb-ash-2:~# mysqltuner
MySQLTuner 2.5.3
* Jean-Marie Renouard jmrenouard@gmail.com
* 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 from Debian maintenance account.
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE
[--] Data in Aria tables: 32.0K (Tables: 1)
[--] Data in InnoDB tables: 314.2M (Tables: 275)
[OK] Total fragmented tables: 0
[!!] Your MySQL version 11.4.3-MariaDB-deb12-log is EOL software. Upgrade soon!
-------- Log file Recommendations ------------------------------------------------------------------
[!!] Log file doesn't exist
-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.
-------- Views Metrics -----------------------------------------------------------------------------
-------- Triggers Metrics --------------------------------------------------------------------------
-------- Routines Metrics --------------------------------------------------------------------------
-------- 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: 1m 2s (4K q [77.339 qps], 56 conn, TX: 27M, RX: 1M)
[--] Reads / Writes: 94% / 6%
[--] Binary logging is disabled
[--] Physical Memory : 1.9G
[--] Max MySQL memory : 1.6G
[--] Other process memory: 0B
[--] Total buffers: 894.0M global + 7.6M per thread (100 max threads)
[--] Performance_schema Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 916.7M (47.77% of installed RAM)
[!!] Maximum possible memory usage: 1.6G (86.02% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/4K)
[OK] Highest usage of available connections: 3% (3/100)
[OK] Aborted connections: 0.00% (0/56)
[!!] Name resolution is active: a reverse name resolution is made for each new connection which can reduce performance
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 494 sorts)
[OK] No joins without indexes
[OK] Temporary tables created on disk: 20% (100 on disk / 485 total)
[OK] Thread cache hit rate: 94% (3 created / 56 connections)
[OK] Table cache hit rate: 98% (5K hits / 5K requests)
[!!] table_definition_cache (400) is less than number of tables (571)
[OK] Open file limit used: 0% (60/500K)
[OK] Table locks acquired immediately: 100% (196 immediate / 196 locks)
-------- Performance schema ------------------------------------------------------------------------
[!!] Performance_schema should be activated.
[--] Sys schema is installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] General MyIsam metrics:
[--] +-- Total MyISAM Tables : 0
[--] +-- Total MyISAM indexes : 0B
[--] +-- KB Size :16.0M
[--] +-- KB Used Size :2.9M
[--] +-- KB used :18.3%
[--] +-- Read KB hit rate: 0% (0 cached / 0 reads)
[--] +-- Write KB hit rate: 0% (0 cached / 0 writes)
[--] No MyISAM table(s) detected ....
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB File per table is activated
[OK] InnoDB Buffer Pool size ( 575.0M ) under limit for 64 bits architecture: (17179869184.0G )
[OK] InnoDB buffer pool / data size: 575.0M / 314.2M
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (12.3478260869565%): 71.0M * 1 / 575.0M should be equal to 25%
[--] Number of InnoDB Buffer Pool Chunk: 64 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: 97.02% (396270 hits / 408428 total)
[!!] InnoDB Write Log efficiency: 84.81% (1306 hits / 1540 total)
[OK] InnoDB log waits: 0.00% (0 waits / 234 writes)
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/352.0K
[!!] Aria pagecache hit rate: 90.7% (788 cached / 73 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:
You are using an unsupported version for production environments
Upgrade as soon as possible to a supported version !
MySQL was started within the last 24 hours: recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=ON
Performance schema should be activated for better diagnostics
Be careful, increasing innodb_log_file_size / innodb_log_files_in_group means higher crash recovery mean time
Variables to adjust:
skip-name-resolve=ON
table_definition_cache (400) > 571 or -1 (autosizing if supported)
performance_schema=ON
innodb_log_file_size should be (=143M) if possible, so InnoDB total log file size equals 25% of buffer pool size.
innodb_log_buffer_size (> 143M)`
any help would be greatly appreciated (my vps is running the latest stable debian 12 (if that helps)