Page 1 of 1

Vesta and Digital Ocean (MySQL stops frequently) SOLVED

Posted: Sun Jun 01, 2014 8:35 pm
by fedekrum
Hi Community !!

I am in love with the hole Vesta CP concept and approach. I am in love with Digital Ocean too (I have never created an destroyed so many virtual machines in my life for testing !!)

I am making my VPS from Ubuntu 14.04 x32 images.

The problem is that I am gettin frecuent MySQL problems after installing vesta.
MySQL just stop responding after god knows what.

So I have created a droplet from scratch and saw this while vesta was installing.

Setting up mysql-server-5.5 (5.5.37-0ubuntu0.14.04.1) ...
invoke-rc.d: policy-rc.d denied execution of stop.
invoke-rc.d: policy-rc.d denied execution of start.

Do you think this is related to my server stopping mysql frequently or this above is normal message while installing?

thanks all

Re: Vesta and Digital Ocean (MySQL stops frequently)

Posted: Sun Jun 01, 2014 9:01 pm
by fedekrum
Well, I was able to reproduce the error from a new Digital Ocean dropplet.

# 1) I have created a 512 ram dropplet with Ubuntu 14.04 x32. (have tested with a 1 Gb too with same result)

# 2) Finish the unfinished locale configuration
echo -e 'LANG="en_US.UTF-8"\nLC_ALL="en_US.UTF-8"\nLANGUAGE="en_US"' > /etc/default/locale
reboot

# 3) Make a Swap partition
sudo fallocate -l 512M /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo echo "/swapfile none swap sw 0 0" >> /etc/fstab
sudo sysctl vm.swappiness=10
sudo echo "vm.swappiness=10" >> /etc/sysctl.conf
sudo sysctl vm.vfs_cache_pressure=50
sudo echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
reboot

# 4) Update the system
apt-get update
apt-get upgrade
reboot

# 5) Install Vesta
curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh
reboot

# 6) Test mysql from console and got ERROR
mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

How can I know what is going wrong with the server?
Thanks

Re: Vesta and Digital Ocean (MySQL stops frequently)

Posted: Mon Jun 02, 2014 1:15 am
by jarland
The best thing to do would be to find out the time that MySQL becomes inaccessible and then examine access logs for the time leading up to it. Most of the time you will notice a particular pattern of traffic leading up to it. Enabling detailed MySQL logging may only make the situation worse and create a new problem that overshadows the previous.

You can also use cPanel's syssnap utility, which works fine on non-cPanel systems. You can use this to log activity on the system and use it to go back to the time of the MySQL failure to find out exactly what happened at that time.

https://github.com/cPanelTechs/SysSnap

Re: Vesta and Digital Ocean (MySQL stops frequently)

Posted: Mon Jun 02, 2014 6:28 am
by ivopatty
I've had the same issue a while back both with zpanel,and vesta.

The solution to that problem was to enable between 1 - 2 gb of swap if you want to do a lot of caching etc. And use a 64 bit kernel instead of a 32 bit version.

I never really figured out why MySQL would stop working on my 32 bit droplets. Which seemed logical to use on 512 MB RAM droplets. But 64 bit Ubuntu solved my issues. Hope it does for you too.

Re: Vesta and Digital Ocean (MySQL stops frequently)

Posted: Mon Jun 02, 2014 9:13 pm
by fedekrum
Well, I don't want to stop the magic commenting this, but my server has been running for more than 20 hours without stopping mysql. The solution was to make sure the server was not hanged doing a stop, then a start and then reconfigure.

service mysql stop && service mysql start && dpkg-reconfigure mysql-server-5.5

On the 32 bit Ubuntu I needed to copy the mysql root password from /usr/local/vesta/conf/mysql.conf because each time I execute this I had to enter it on the following screen.

I tested the same on the 64 bit machine and had the same issue. The solution worked the same way, except that the reconfigure never asked me the mysql root password.

Thanks for the suggestions.

Re: Vesta and Digital Ocean (MySQL stops frequently)

Posted: Wed Jun 04, 2014 12:11 am
by fedekrum
After 46 more hours of mysql not stoping, I consider the suggested "service mysql stop && service mysql start && dpkg-reconfigure mysql-server-5.5" the definitive solution.

Be happy !!! ;o)

Re: Vesta and Digital Ocean (MySQL stops frequently) SOLVED

Posted: Sun Aug 03, 2014 8:21 am
by spelot
Excuse me, but how to solve the same problem on Centos 6.5 ? There's no such option "dpkg-reconfigure". Many thanks!

Re: Vesta and Digital Ocean (MySQL stops frequently) SOLVED

Posted: Fri Jan 02, 2015 12:40 pm
by iamkingsleyf
Having same problem, dont know why some services stop working

Re: Vesta and Digital Ocean (MySQL stops frequently) SOLVED

Posted: Wed Jan 07, 2015 1:34 am
by emardotcom
Please provide specs for your Server (Distribution + version, MySQL version, etc) the more information the better. Also you may want to report this at https://bugs.vestacp.com