MySQL occasionally crashing

Posted March 10, 2014 3.5k views
Im running an ecommerce Wordpress site on a 512mb vps. I occasionally get messages that say "this page is unavailable, try again later" and MySQL occasionally crashes and I have to restart the service. Anybody know why this could be? the database is 20mb

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.

Submit an Answer
3 answers
I would assume that you are probably running out of memory due to running so many services on such little ram. Try resizing your droplet to 1gb and see if the problem goes away.
@Josh Frye

I'll give it a shot thank you! Do you know of any ways to optimize memory usage?
I would add swap space to your server, for me, this fixed the issue I as having.
by Etel Sverdlov
Linux swaps allow a system to harness more memory than was originally physically available. Here's how to set up a linux swap file on Ubuntu 12.04