0
I have no knowledge in mysql, and it was very difficult to understand the diagnosis of Tuner.
My problem is that when the site gets too many visits, the connection to the bank drops. I’m using a Digital Ocean VPS with 2gb RAM Follows:
MySQLTuner 1.6.10 - Major Hayden <[email protected]>
Bug reports, feature requests, and downloads at http://mysqltuner.com/
Run with '--help' for additional options and output filtering
[OK] Logged in using credentials from debian maintenance account.
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.7.12-0ubuntu1
[OK] Operating on 64-bit architecture
-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in MyISAM tables: 2M (Tables: 10)
[--] Data in InnoDB tables: 39M (Tables: 13)
[!!] Total fragmented tables: 5
-------- Security Recommendations ------------------------------------------------------------------
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[--] Bug #80860 MySQL 5.7: Avoid testing password when validate_password is activated
-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined
-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 42m 21s (2 q [0.001 qps], 963 conn, TX: 170B, RX: 251B)
[--] Reads / Writes: 100% / 0%
[--] Binary logging is disabled
[--] Physical Memory : 2.0G
[--] Max MySQL memory : 880.0M
[--] Other process memory: 650.5M
[--] Total buffers: 680.0M global + 1.0M per thread (200 max threads)
[--] P_S Max memory usage: 72B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 684.0M (34.19% of installed RAM)
[OK] Maximum possible memory usage: 880.0M (43.99% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/2)
[OK] Highest usage of available connections: 2% (4/200)
[OK] Aborted connections: 0.21% (2/963)
[OK] Query cache is disabled by default due to mutex contention.
[OK] No Sort requiring temporary tables
[OK] No joins without indexes
[OK] No tmp tables created on disk
[OK] Thread cache hit rate: 99% (4 created / 963 connections)
[OK] Table cache hit rate: 100% (330 open / 0 opened)
[OK] Open file limit used: 11% (117/1K)
[OK] Table locks acquired immediately: 100% (3K immediate / 3K locks)
-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.
-------- Performance schema ------------------------------------------------------------------------
[--] Performance schema is enabled.
[--] Memory used by P_S: 72B
[--] Sys schema is installed.
-------- MyISAM Metrics ----------------------------------------------------------------------------
[!!] Key buffer used: 18.4% (49M used / 268M cache)
[OK] Key buffer size / total MyISAM indexes: 256.0M/1.5M
[OK] Read Key buffer hit rate: 97.2% (11K cached / 310 reads)
[!!] Write Key buffer hit rate: 73.3% (937 cached / 250 writes)
-------- AriaDB Metrics ----------------------------------------------------------------------------
[--] AriaDB is disabled.
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB buffer pool / data size: 256.0M/39.5M
[OK] InnoDB buffer pool instances: 1
[!!] InnoDB Used buffer: 16.33% (2675 used/ 16382 total)
[OK] InnoDB Read buffer efficiency: 99.97% (7868337 hits/ 7870588 total)
[!!] InnoDB Write Log efficiency: 50.17% (295 hits/ 588 total)
[OK] InnoDB log waits: 0.00% (0 waits / 883 writes)
-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.
-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.
-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] This is a standalone server.
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
O que devo melhorar no mysql.cnf?
Adicionando parte do log:
2016-04-27T16:56:17.559720Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-04-27T16:56:17.559887Z 0 [Warning] Changed limits: table_open_cache: 407 (requested 2000)
2016-04-27T16:56:17.797712Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.12-0ubuntu1) starting as process 31656 ...
2016-04-27T16:56:17.854744Z 0 [Warning] /usr/sbin/mysqld: ignoring option '--innodb-file-per-table' due to invalid value '4'
I found this more.
The first thing is that the server has to run more than 24 hours, it is up 42 minutes. So all recommendations (if any) are incorrect.
– Rafael Mena Barreto
That was exactly the problem, he fell.. by the "little db' I have, da para ter uma noção da configuração?
– Henrique Silva
Then it’s more serious and Tuner won’t help you, you have to search the logs, the database and the applications that access it to know exactly what happened. Changing settings without knowing what you’re doing will not only not help you but give you more trouble (own experience)
– Rafael Mena Barreto
I edited the question and includes the WARMING I found in the error log
– Henrique Silva