• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

MySQL Problems

themoose

Sup, Recoil here.
NLC
MySQL never starts. Apparently.

MySQL is up and running, its working perfectly. At least it is for a while. Then it just stops.

In Virtuozzo it says mySQL is 'Stopped' even when it's running (a big red cross).

I try starting it, restarting it, stopping it and starting it, but it still says stopped.

So yesterday I installed SIM to try and stop it from stopping, yet I come back home today and mySQL is down. The only way I can get it up again is by rebooting.

I use Virtuozzo, SSH & DirectAdmin to control my VPS.

Please can somebody help?

Thanks,

TM
 
I dont think you understand what i'm saying.

Virtuozzo says mysql is stopped, whether or not it is, and there is no way to say it is running. Once or twice a day mySQL fails.
 
are you using a all in one mysql program like xammp, or did you just install mysql by itself? have you tried re-installing mysql, and have you done a scan for some sort of virus that may cause this problem, and do you have any firewalls that may be messing with it?
 
What errors do you get when you try to srart it? Anything in the logs?
What does /var/lib/mysql/<hostname>.err say?
 
T.M. said:
I dont think you understand what i'm saying.

Virtuozzo says mysql is stopped, whether or not it is, and there is no way to say it is running. Once or twice a day mySQL fails.

Virtuozzo is known to say things like that, you should never look at that as its always wrong, it seems your MySQL isnt optimized correctly hence it keeps going down. You would need a system admin to do this unless you know.
 
ingfina said:
What errors do you get when you try to srart it? Anything in the logs?
What does /var/lib/mysql/<hostname>.err say?

here's a cut-off

Code:
060509 12:04:27 [ERROR] mysqld: Got error 12 from select
060509 12:15:14 [ERROR] Error in accept: Cannot allocate memory
060509 12:15:14 [ERROR] /usr/sbin/mysqld: Can't find file: './admin_img/images.frm' (errno: 23)
060509 12:15:33 [Note] /usr/sbin/mysqld: Normal shutdown

060509 12:15:34  InnoDB: Starting shutdown...
060509 12:15:35  InnoDB: Shutdown completed; log sequence number 0 43634
060509 12:15:35 [Note] /usr/sbin/mysqld: Shutdown complete

060509 12:15:35  mysqld ended

060509 12:15:36  mysqld started
060509 12:15:36 [Warning] Asked for 196608 thread stack, but got 126976
060509 12:15:36  InnoDB: Started; log sequence number 0 43634
/usr/sbin/mysqld: ready for connections.
Version: '4.1.11-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
060509 13:12:06 [ERROR] mysqld: Got error 12 from select
060509 13:12:16 [ERROR] Error in accept: Cannot allocate memory
060510 09:54:57  mysqld started
060510  9:54:57 [Warning] Asked for 196608 thread stack, but got 126976
060510  9:54:58  InnoDB: Started; log sequence number 0 43634
/usr/sbin/mysqld: ready for connections.
Version: '4.1.11-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)

It looks like there's a problem with allocating memory.
 
min 128MB RAM

Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 450
MaxRequestsPerChild 1000
 
T.M. said:
It looks like there's a problem with allocating memory.
Thats correct.

If you have free RAM:
Take a look at my.cnf and see if there is something obvious wrong. If not then have a read: VPS forum at WHT.
Optimize your my.cnf and give it a go.
(The thread stack is usually NOT a serious problem, just a warning.)
 
we have a lot of vps accounts that in virtuozzo says several things are stopped but really are running. i think this is a bug in the system and we do not use that tool anyway.
 
ingfina said:
Thats correct.

If you have free RAM:
Take a look at my.cnf and see if there is something obvious wrong.

Yeah, there's something wrong. It's not there :x

[root@s1 ~]# whereis my.cnf
my:

it's not in /etc/ either.
 
That did nothing.

I'm just going to leave Cron to restart mySQL every 60 mins.. just incase it does go down when i'm not here.
 
Leaving cron to reboot MySQL is NOT the solution and something I do not recommend. You need to get to the bottom of them, having MySQL crash could result in you losing your database or losing privilage to it.
 
T.M. said:
Yeah, there's something wrong. It's not there :x

[root@s1 ~]# whereis my.cnf
my:

it's not in /etc/ either.
That is correct (and the source of your problem).
DA does not have a my.cnf by default. You need to create the file /etc/my.cnf and put in the settings you like to have. Then restart Mysql, which will make sure that the settings in /etc/my.cnf are used.

You should ask your VPS provider if they have a recommended my.cnf for their VPS's, if not then you need to do the work.
 
Back
Top