Portal Home > Knowledgebase > Industry Announcements > Web Hosting Main Forums > Providers and Network Outages and Updates > Find what is restarting MySQL?


Find what is restarting MySQL?




Posted by Lakjin, 10-29-2016, 03:14 AM
Every second day at 3 AM, MySQL is restarted on my dedicated server. I am not doing it and I am the only one with access to my server (no, I haven't been hacked). I've looked in mysql_error.log and it only shows MySQL going down, it doesn't tell me why. I've looked at my crons and cPanel crons and root / server crons, and I cannot identify what is restarting MySQL. I see that cPanel's daily updater runs around this same time, but I don't see any MySQL restarting in the daily updater log. How can I identify what is restarting MySQL? Any tips?

Posted by 24x7group, 10-29-2016, 10:05 AM
Are there any backups being taken around that time by cpanel? That could explain.

Posted by Lakjin, 10-29-2016, 02:38 PM
No. Plus, why would backups restart MySQL?

Posted by 24x7group, 10-29-2016, 03:09 PM
It could've been an option, trying to think with you. Perhaps you can run it in debug mode to find the actual cause, more info here: https://fedoraproject.org/wiki/How_t...QL_and_MariaDB

Posted by Nik-, 10-29-2016, 03:17 PM
What version are we talking about? Can you check if you maybe have two versions of MySQL installed?

Posted by kevincheri, 10-29-2016, 03:21 PM
did you check the chksrvd logs? its probably that chksrvd finds mysql as down for some reason and restarts it.

Posted by Lakjin, 10-29-2016, 03:32 PM
Thank you will see if this helps.

Posted by Lakjin, 10-29-2016, 03:33 PM
No, only one. MariaDB 10.1.

Posted by Lakjin, 10-29-2016, 03:33 PM
That is not the problem. I checked the logs, plus I would get an email if it were down.

Posted by KaliLove, 10-29-2016, 07:06 PM
does your hostname.err file in /var/lib/mysql report anything unusual that you could possibly paste into this thread? I've run into a similar issue before, twice actually. 1) mysql has gone away = max allowed packet size needed to be increased 2) mysql restarting on its own around 3am (usually around the time our wordpress sites/server get attacked) = found that we needed to make adjustments to both InnoDB and MyISAM in order to allocate slightly more of the system's physical resources to MySQL in order for it to stop shutting down repeatedly. I would suggest checking the hostname.err file and running a "sar" report to get a snapshot of your system's load averages around the time the restart continuously occurs. Other than that I would consider checking if there are updates/backups involving mysql since that would cause it too in some cases.

Posted by Lakjin, 10-29-2016, 07:33 PM
I looked in hostname.err. It just tells me mysql is restarting, no reason why. I will look at your suggestion (1) but seeing as the restart of MySQL appears to be systematic (i.e. every second day at the same time), I doubt this is the issue. As for (2), resources is not a problem -- MySQL connections are never maxed out and we have plenty of excess RAM and CPU power to handle whatever is thrown at MySQL.

Posted by KaliLove, 10-29-2016, 08:08 PM
Also, One other thing you may want to do if you haven't already. run mysqlcheck --check --all-databases, perhaps there's a corrupted database/table causing the issue.

Posted by Srv24x7, 10-30-2016, 01:23 AM
Hi, I think you just to need to start monitoring the server for 10 -15 minutes starting at 2:55 AM and see what is triggering on the server that actually does this. Solution to this will be observing it at the same time when the even occurs.. perhaps that would give a starting point for further investigation..

Posted by WPCYCLE, 10-30-2016, 10:18 AM
Corrupted databases and sometimes even a cPanel upgrade can create a slight issue that could lead to this.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
OVH is down in Hong Kong (Views: 1071)
Volumedrive outage? (Views: 1009)
scottdalehosting.com (Views: 942)


Language: