Error establishing a database connection
Hi. I'm using 512 mb droplet with with Ubuntu 14.04 x64 and Sentora panel (installed on a fresh Ubuntu droplet). Then I followed these tutorials before I moved my websites on DO: Initial Server Setup with Ubuntu 14.04 and Additional Recommended Steps for New Ubuntu 14.04 Servers. My swap file is 1 GB.
I'm using this doplet for almost 2 months. I have 2 small Wordpress websites. The main one have around 200 visitors a day, the second one have around 60 visitors a day. Since the droplet's start I'm experiencing Database Errors - Error establishing a database connection. Here is the error I have when I visit wp-admin.php: http://i.imgur.com/BbFXGti.png
I have to login via Putty nad type: sudo service mysql start. At the beginning these errors happened maybe 2-3 times a week. But currently I'm experiencing this problem 2-3 times a day. Maybe more, because I don't know if there is a MySQL auto restart in Sentora panel. As far as I know, 512 MB droplet with 1 GB swap file should be enough for the traffic I have. At first I thought, maybe it happens when there are many people at the same time. So I opened live view on my Google Analytics page and noticed that in many cases when the error occurs, I had max 3 visitors at the same time. I had moments when there are 10-15 people at the same time surfing through my website's posts and there are no errors.
I have no idea how to solve this problem. Can anyone help me?