DB Issues with Wordpress on EE (solved)


#1

Hello Easy Engine community.

I’m having issues on Wordpress with a website that when spikes it gives me the famous “error establishing a database connection”.

I’m using a 1gb DO vps, with ee --wpredis --php7 (also use cloudflare and autoptimize) and this is my mysqltuner output.

MySQLTuner 1.6.15 - Major Hayden major@mhtx.net Bug reports, feature requests, and downloads at http://mysqltuner.com/ Run with ‘–help’ for additional options and output filtering

[–] Skipped version check for MySQLTuner script Please enter your MySQL administrative login: root Please enter your MySQL administrative password: [OK] Currently running supported MySQL version 10.1.17-MariaDB-1~trusty [OK] Operating on 64-bit architecture

-------- Storage Engine Statistics ----------------------------------------------------------------- [–] Status: +Aria +CSV +InnoDB +MEMORY +MRG_MyISAM +MyISAM +PERFORMANCE_SCHEMA +SEQUENCE [–] Data in InnoDB tables: 2M (Tables: 24) [OK] Total fragmented tables: 0

-------- 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: 10m 48s (1K q [1.728 qps], 112 conn, TX: 548K, RX: 195K) [–] Reads / Writes: 86% / 14% [–] Binary logging is enabled (GTID MODE: OFF) [–] Physical Memory : 992.7M [–] Max MySQL memory : 1.3G [–] Other process memory: 183.2M [–] Total buffers: 624.0M global + 7.5M per thread (100 max threads) [–] P_S Max memory usage: 0B [–] Galera GCache Max memory usage: 0B [OK] Maximum reached memory usage: 639.1M (64.38% of installed RAM) [!!] Maximum possible memory usage: 1.3G (138.74% of installed RAM) [!!] Overall possible memory usage with other process exceeded memory [OK] Slow queries: 0% (0/1K) [OK] Highest usage of available connections: 2% (2/100) [OK] Aborted connections: 0.89% (1/112) [!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance [OK] Query cache efficiency: 36.7% (357 cached / 972 selects) [OK] Query cache prunes per day: 0 [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 49 sorts) [OK] No joins without indexes [!!] Temporary tables created on disk: 38% (51 on disk / 134 total) [OK] Table cache hit rate: 85% (35 open / 41 opened) [OK] Open file limit used: 5% (56/1K) [OK] Table locks acquired immediately: 100% (283 immediate / 283 locks) [OK] Binlog cache memory access: 100.00% ( 93 Memory / 93 Total)

-------- Performance schema ------------------------------------------------------------------------ [–] Performance schema is disabled.

-------- ThreadPool Metrics ------------------------------------------------------------------------ [–] ThreadPool stat is enabled. [–] Thread Pool Size: 1 thread(s). [–] Using default value is good enough for your version (10.1.17-MariaDB-1~trusty)

-------- MyISAM Metrics ---------------------------------------------------------------------------- [!!] Key buffer used: 18.2% (24M used / 134M cache) [OK] Key buffer size / total MyISAM indexes: 128.0M/123.0K

-------- AriaDB Metrics ---------------------------------------------------------------------------- [–] AriaDB is enabled. [OK] Aria pagecache size / total Aria indexes: 128.0M/1B [OK] Aria pagecache hit rate: 98.8% (3K cached / 40 reads)

-------- InnoDB Metrics ---------------------------------------------------------------------------- [–] InnoDB is enabled. [OK] InnoDB buffer pool / data size: 256.0M/2.0M [!!] InnoDB buffer pool <= 1G and innodb_buffer_pool_instances(!=1). [!!] InnoDB Used buffer: 2.80% (459 used/ 16383 total) [OK] InnoDB Read buffer efficiency: 98.03% (22294 hits/ 22741 total) [!!] InnoDB Write Log efficiency: 76.51% (456 hits/ 596 total) [OK] InnoDB log waits: 0.00% (0 waits / 140 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: MySQL started within 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. Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1 When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries which have no LIMIT clause Variables to adjust: *** MySQL’s maximum memory usage is dangerously high *** *** Add RAM before increasing MySQL buffer variables *** tmp_table_size (> 32M) max_heap_table_size (> 32M) innodb_buffer_pool_instances (=1)

The website is very clean, and well optimized. I try not to load it with many plugins and it seems after a small traffic spike like 300-400 the server crashes. Never had this problem with ee wpfc hhvm configurations ( i saw websites on a 10$ vps getting 3k online).

I’ve tried many fixes: repairing db, replaced wp core files, etc…

1- Can you help me out, or point me in the right direction?

2- By the way, what configuration do you recommend for high traffic websites? Thank you.

UPDATE

Solved it by reinstalling everything from the ground up, and used a different setting for the website –wpfc --php7

Seems fine now. Thanks anyway.


#2