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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

HI, Check your config for mysql. How many simultaneous connection do you allow? That to me is the source of most memory errors.