MySQL
Code Snippets
- Key buffer errors:
Increase Key Buffer ( yours is currently 64MB, but total indexes are 116M, so put at least 128MB). Should help immediately.
2. Run mysqloptimize and mysqlrepair on your tables
3. Increase table cache/ decrease total number of tables to increase the table cache hit rate. Maybe you've got some unused or old tables which could be deleted.
Other recommended confugration options:
• log_slow_queries = /var/log/mysql/mysql-slow.log
• long_query_time = 4
• log-queries-not-using-indexes
Check log file after some time.
Links
- https://www.wpspeedfix.com/speed-up-wordpress-database-queries/ (opens in a new tab)
- https://mediatemple.net/community/products/dv/360039253131/troubleshooting-mysql-server-has-gone-away-wordpress-error (opens in a new tab)
- Mysql Tuner (opens in a new tab)
- Optimize table (opens in a new tab)
- Tune MySQL for Wordpress Site (opens in a new tab)
- MySQL 100% CPU Usage (opens in a new tab)
Last updated on January 18, 2023