MySQL always crash every sunday morning
Hi there,
I'm using MySQL 5.6.23 on WHM 11.48.4 (build 4) / CENTOS 6.6 x86_64 xenpv.
Since two months or so, every sunday morning (around 1AM UTC-5) MySQL stop working, I need to restart it manually. And otherwise it would start by itself like 4 to 6 hours after it has crashed.
In the mysql log there is nothing related to a shutdown except when I manually did the graceful reboot.
Do you have any clue what would cause this strange behaviour and how to resolve it?
Thanks.
-
Hello, Please check cron logs and I think one of the cron stop mysql serivce. I suggest that you add the sript which start the mysql automatically, so you do not need to start it manually. The following script is used to start mysql automatically when it is failed or stopped on the server. 1) open file vi /root/automysqlstart.sh and add the following code and save it ======== #!/bin/bash #Checking whether MySQL is alive or not if mysqladmin ping | grep -q "alive"; then echo "MySQL is up" else /etc/init.d/mysqld restart fi ============================ 2) You can set 2 min cron and it restart the mysql automatically. vi /var/spool/cron/root */2 * * * * /bin/sh /root/automysqlstart.sh 3) Done 0 -
Yes, You can setup this script on your server but first you will have to find out root the cause of this mysql issues. I will suggest you please monitor you server process and mysql error logs on your server that time. 0 -
Home "Service Configuration "Service Manager, MySQL Server - should take care of keeping MySQL up. Around 1 AM, are backups running? Is the server overloaded? Sounds like you need to hire someone to take a closer look at your server. 0 -
Thanks for those tips and advices, really appreciated. Yes, backups are running at 1AM every day, but MySQL crash only on sunday which is really strange. No the server is normally never overloaded. True, maybe we should investigate further, I'm calling my tech, but in the meantime I need MySQL to be always up and running. 0
Please sign in to leave a comment.
Comments
4 comments