mysql going down like every 2 weeks

sander815

Verified User
Joined
Jul 29, 2003
Messages
474
every 2-3 weeks or so, mysql goes down

phpBB : Critical Error

Could not connect to the database

no errors in mysql log, just restart it and its ok
what causes that?

already upgraded to 4.0.18
 
What about /var/log/messages?
How much ram do you have and are you using any swap (possibly running out of memory?)
Double check free disk space.

John
 
Run "top" to see if any of the swap is being used. Once it's all gone, then your system will run out of memory and die.

You could put a restart cron for mysql to be run once a week (RedHat):
Code:
echo "0 6 * * 1 /sbin/service mysqld restart" >> /etc/crond.d/directadmin_cron
killall -HUP crond
John
 
Mem: 1031532K av, 991016K used, 40516K free, 0K shrd, 86348K buff
Swap: 522104K av, 240K used, 521864K free 777984K cached

this weekend again 2 times down

could it have something to do with sysbk running?
 
Hello,

Yes, it's possible. I'm not aware of what actions sysbk takes, so can't really comment on it.

Your ram seems fine. (you actually have 1 gig of ram)

John
 
upgraded it to 1gb.....no succes

i don't know if, when sysbk is backing up mysql, mysql can't access the db's, and goes down because of that?
 
Try disabling sysbk or running it manually a few times and see if that makes any difference?

Chris
 
Hi

i'm the host

we have upgrade RAM from 256 to 1gb

MYSQL will shutdown when sysbk will backup mysql
on the exact time.

the log files are empty. so no info why its shutdown.
and it won't restart

i've disable sysbk and everything is working
but there is no backup :)
 
I just downloaded it and sysbk and one of the thing syou could do, is to modify the inernals.sysbak file around line 151. It reads:
Code:
if [ ! -f "$MYSQL_PID" ]; then
      $MYSQL_INIT start >> /dev/null 2>&1
fi

That is saying that if the $mysql.pid file does not exist then restart it and redirect all output to /dev/null. To debug this problem here is what I would do. I would change the above lines to something similar to:
Code:
if [ ! -f "$MYSQL_PID" ]; then
      $MYSQL_INIT start >> /tmp/mysql_init.$$ 2>&1
else
       echo $MYSQL_PID already existed >> /tmp/mysql_init.$$ 2>&1
fi
That will create a new file in /tmp called mysql_init.${pid_of_sysbk} and contain the result of the '/etc/init.d/mysql start' command or if the /var/run/mysql.pid file already existed so it did not do the startup.

My guess is that the pid file never got removed. Of course if it did and mysql never started, you should have some sort of error message in that file, and you will just need to address that error.
 
well I got the same prob only my SQL dies every few hours

my TOP is

00:56:48 up 3 days, 23:31, 1 user, load average: 21.07, 21.01, 19.80
324 processes: 313 sleeping, 10 running, 1 zombie, 0 stopped
CPU states: 50.6% user 49.3% system 0.0% nice 0.0% iowait 0.0% idle
Mem: 1546608k av, 1531996k used, 14612k free, 0k shrd, 120804k buff
1071308k actv, 97888k in_d, 134208k in_c
Swap: 522104k av, 25964k used, 496140k free 649304k cached

httpd takes all the CPU usage

I got more then 25+ httpd & MySQL pids running all of my clients are leaving me because of this issue

Mybe its the Apche 1.3.29
I wanna upgrade to 2.40.x but I can't because of config issues if anyone can help me with the config problem so I can upgrade and see if that is the problem
 
with /etc/my.cnf file sql dies within 20-30min
without it, it works for a day or two and then slows the machine down making me to restart the sql and the httpd to get back to normal usage
 
sander815 said:
stopping sysbk didn't solve it...down again today

You don't happen to be running a process monitor like PRM? I could see that killing mysql if it exceeds a predetermined limit.
 
Hello,

Check the boot directory for a duplicate mysql boot file.

Redhat: /etc/init.d/mysqld
FreeBSD: /usr/local/etc/rc.d/mysqld

These are the files that should be there.

Mark
 
remove the one named mysql and also check there is only 1 instance shown in chkconfig

chkconfig --list

Chris
 
mysqld 0:eek:ff 1:eek:ff 2:eek:n 3:eek:ff 4:eek:n 5:eek:ff 6:eek:ff
mysql 0:eek:ff 1:eek:ff 2:eek:n 3:eek:n 4:eek:n 5:eek:n 6:eek:ff


So i will remove mysql

and use only mysqld
 
Back
Top