I have a small VPS that handles my 3 personal WordPress websites.
At a certain time MySQL started consuming more and more memory and actually (for months) the server has been running at 99% RAM usage with MySQL eating more than 2 GB alone.
My VPS is an Ubuntu 14.04.05
with MySQL 5.7.23
(I upgraded to avoid the memory eating bug), 2 amd64 CPU@3.9GHZ
and 3 GB of RAM
.
The webserver is configured by Virtualmin, with little to no modifications applied by myself (read after).
I tried MySQLTuner, and some other scripts but nothing helps.
I have only these 3 websites and every time the traffic spikes (these are personal websites, so "spikes" are maybe 3 users at the same time) the VPS crashes.
Can you please help me configure it to use lesser RAM or diagnose if there is an issue?
I'm thinking about switching to MariaDB, but without changing the configuration I don't think that anything will change.
All the relevant informations are in this pastebin (posted Aug 7, 2018) for readability:
According to MySQL Calculator it should only require 293 MB and I don't have so much visitors to justify this usage.
Best Answer
Suggestions to consider for your my.cnf [mysqld] section
for additional suggestions, view profile, Network Profile for contact info, including Skype ID.