Page 1 of 1

Need to stop mySQL Service for websites to work

Posted: Tue Apr 14, 2015 7:00 am
by gxHL
Hi i am new to vestacp and after i had everything set up i run from ssh the command to reset my stats

Code: Select all

/usr/local/vesta/bin/v-update-sys-queue disk
after that the server collapsed and i had to restart. I used

Code: Select all

shutdown -r now


After the restart the server comes back online and mySQL shuts down after a few seconds and i am getting this error (among others)

Code: Select all

Can't open file: './db_name_main/t64hj_session.frm' (errno: 24) SQL=INSERT INTO `t64hj_session` (`session_id`, `client_id`, `time`) VALUES ('16e5eab189acfbf9e6d1e5d36145e9ed', 0, '1428994228')

Anyhow after i shutdown the mySQL service everything seems to work perfectly normal.

I am running on 1gb RAM VPS from DO and Ubuntu 14.04.1 LTS.

Edit: I have also noticed something strange in Services page where memory from apache2 is 5773 mb.
Is this normal?

Any ideas where did i screwed up and how to fix this?
Thanks in advance.

Re: Need to stop mySQL Service for websites to work

Posted: Tue Apr 14, 2015 6:02 pm
by skurudo

Re: Need to stop mySQL Service for websites to work

Posted: Tue Apr 14, 2015 11:07 pm
by gxHL
Hi, thanks for the reply but it did not work for me.

I run the command

Code: Select all

update-rc.d mysql disable
and then I tried again the command with the edited file but still the same :(
Look in /etc/init/mysql.conf and edit the following:

Near the topc of mysql.conf, comment the following line:
start on runlevel [2345]

Add the following line directly after that commented code:

#start on runlevel [2345] start on (net-device-up IFACE=eth0 and local-filesystems and runlevel [2345])

After commenting the following line, it should look like this:
#start on runlevel [2345]
start on (net-device-up IFACE=eth0 and local-filesystems and runlevel [2345])
stop on starting rc RUNLEVEL=[016]

Or IFACE=lo but that may present issues. Successfully tested on 14.04 with multiple restarts after running into this issue.

Re: Need to stop mySQL Service for websites to work

Posted: Tue Apr 14, 2015 11:20 pm
by gxHL
Hi i have fixed my issue by editing the file

Code: Select all

/etc/mysql/my.cnf
Under

Code: Select all

[mysqld]
Paste

Code: Select all

open_files_limit = 5000

Re: Need to stop mySQL Service for websites to work

Posted: Wed Apr 15, 2015 4:47 am
by skurudo
Yep, open_files_limit - this second thing