mysql went down after ab test

  • Posted September 5, 2013


After testing the sites hosted on Digital Ocean using ab, MySql goes down and cannot connect to the database. It happens every time and I need to start the MySql service. Is there anyone who knows the reason and how to prevent this?

Thanks, Nay


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

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.

If MySQL is crashing even with swap activated, I think it’s time to upgrade your droplet. Anything other than that will only affect performance.

Did some load testing today and had the same issue. I was watching the resources with htop in realtime during the test and saw CPU load, memory usage went to max, then filling out the swap. Finally, mysql crashed at some point, as expected. As soon as the stress test ends, memory/cpu usage goes down. The only problem - mysql is offline. Is there any way to restart (start in this case) mysql service automatically?