How does MySQL manage memory?
I have a 1GB memory Droplet on which I am trying to run a LAMP stack with (so far) a few WordPress sites. For a lot of the time everything runs fine, but now three times in less than a week MySQL has crashed. On each occasion it appears to have attempted a restart when connections reached zero.
I’ve researched many questions and tutorials on DO and checked for XML-RPC attacks (possibly, but not near the time of the MySQL crash) and tried configuring more memory by default, but I am not winning.
What I don’t understand is why, when MySQL seems to restart itself when connections reach zero, that it was running fine, for possibly over 24 hours, and then it does not have enough memory to restart? Two of the three times I was able to simply restart it and all was fine for a while. This morning I could not get it to start at all, but a server reboot solved it and it has been running for 10 hours since.
Is there something I can do to placate MySQL, or do I have to upgrade the memory on my Droplet, and in that case, how far do I need to go?
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.×