Mentok May 10th, 2006, 10:24 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
iBrightDev May 10th, 2006, 10:31 why dont you try using Xammp. i havent had any problems with it at all.
Mentok May 10th, 2006, 10:35 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.
iBrightDev May 10th, 2006, 10:38 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?
ingfina May 10th, 2006, 10:56 What errors do you get when you try to srart it? Anything in the logs?
What does /var/lib/mysql/<hostname>.err say?
Craig May 10th, 2006, 11:18 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.
Mentok May 10th, 2006, 11:48 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
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.
Craig May 10th, 2006, 11:57 What RAM does the VPS have & whats the apache connection limit?.
Mentok May 10th, 2006, 12:05 min 128MB RAM
Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 450
MaxRequestsPerChild 1000
ingfina May 10th, 2006, 15:22 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.)
ihostdev May 10th, 2006, 23:43 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.
Mentok May 11th, 2006, 10:31 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.
Tree May 11th, 2006, 14:08 # updatedb
# slocate my.cnf
Mentok May 11th, 2006, 14:39 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.
utcrazy May 11th, 2006, 14:55 Easy solution there I suppose.
Robert May 11th, 2006, 15:39 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.
ingfina May 12th, 2006, 09:14 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.
|
|