Troubles with wordops

Hi there, I have a wordops server based on ubuntu 20.04.4 with php74 on a optmized CPU server with 32GB and 16 cores. I have installed 25 sites and I have around 100k page views daily.

I´m getting problems when a specific site uploads content which gets a lot of concurrent traffic, server is down or can´t connect to database. I launched mysqltuner and there is a few things that I can´t get it solved yet, this is mysqltuner recommendations.

Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    join_buffer_size (> 256.0K, or always use indexes with JOINs)

Anyone could help on how to get that recommendations ready? This is the full mysqltuner analysis:

[--] Skipped version check for MySQLTuner script
[OK] Logged in using credentials passed on the command line
[OK] Currently running supported MySQL version 10.5.17-MariaDB-1:10.5.17+maria~ubu2004-log
[OK] Operating on 64-bit architecture
-------- Log file Recommendations ------------------------------------------------------------------
[!!] Log file  doesn't exist
-------- Storage Engine Statistics -----------------------------------------------------------------
^[[D[--] Data in InnoDB tables: 1.2G (Tables: 2881)
[OK] Total fragmented tables: 0
-------- 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 are 618 basic passwords in the list.
-------- CVE Security Recommendations --------------------------------------------------------------
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 5m 40s (819K q [2K qps], 4K conn, TX: 3G, RX: 105M)
[--] Reads / Writes: 99% / 1%
[--] Binary logging is disabled
[--] Physical Memory     : 31.4G
[--] Max MySQL memory    : 381.4G
[--] Other process memory: 0B
[--] Total buffers: 12.6G global + 75.5M per thread (5000 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 16.1G (51.24% of installed RAM)
[!!] Maximum possible memory usage: 381.4G (1216.37% of installed RAM)
[!!] Overall possible memory usage with other process exceeded memory
[OK] Slow queries: 0% (0/819K)
[OK] Highest usage of available connections: 0% (47/5000)
[OK] Aborted connections: 0.40%  (20/4948)
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 85K sorts)
[!!] Joins performed without indexes: 71
[!!] Temporary tables created on disk: 39% (21K on disk / 55K total)
[OK] Thread cache hit rate: 99% (47 created / 4K connections)
[OK] Table cache hit rate: 78% (857K hits / 1M requests)
[OK] table_definition_cache (10000) is greater than number of tables (3074)
[OK] Open file limit used: 0% (29/500K)
[OK] Table locks acquired immediately: 100% (1K immediate / 1K locks)
-------- Performance schema ------------------------------------------------------------------------
[--] Performance_schema is activated.
[--] Memory used by P_S: 72B
[--] Sys schema is not installed.
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
-------- MyISAM Metrics ----------------------------------------------------------------------------
[--] No MyISAM table(s) detected ....
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 9.5G / 1.2G
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 2.0G * 1/9.5G should be equal to 25%
[--] Number of InnoDB Buffer Pool Chunk: 76 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.86% (51394873 hits/ 51468239 total)
[!!] InnoDB Write Log efficiency: 172.59% (3847 hits/ 2229 total)
[OK] InnoDB log waits: 0.00% (0 waits / 6076 writes)
-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine is enabled.
[OK] Aria pagecache size / total Aria indexes: 128.0M/336.0K
[!!] Aria pagecache hit rate: 88.9% (179K cached / 19K 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.
    We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
             (specially the conclusions at the bottom of the page).
    Temporary table size is already large - reduce result set size
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Consider installing Sys schema from for MySQL
Variables to adjust:
  *** MySQL's maximum memory usage is dangerously high ***
  *** Add RAM before increasing MySQL buffer variables ***
    join_buffer_size (> 256.0K, or always use indexes with JOINs)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

The MySQL's maximum memory usage is dangerously high indicates that the values that you’ve defined in your my.cnf file are too high. You would need to reduce them a little bit otherwise MySQL can consume all of the available RAM on your server and crash.

Feel free to share your my.cnf file here and I could try to advise you further.

Another option is to try out Releem:

Releem is a MySQL performance tuning as a service and they’ve just released a free plan. It is much more user friendly compared to the MySQL tuner script and they also provide you with the config file that you should use, so you don’t have to come up with the values yourself.

Here is a quick tutorial on how to set it up:

Hope that this helps!