Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jan 2010
    Location
    Denver, CO, USA
    Posts
    8

    Default MySQL randomly restarting

    We have a little bit older cPanel server (running cPanel 11.25.0-R46156 - WHM 11.25.0 - X 3.9 ), and it is randomly restarting the mysql service.

    Last Friday, the MySQL service restarted 2 times (approx 5:00 and 9:00 in the am). Yesterday, it restarted 2 times (approximately 9:00 in the am, and 3:00 in the afternoon).

    We are not able to find any useful information about why the service is randomly restarting on this one server. When we look at /usr/local/sim/sim/log it shows:
    Code:
    [06/07/10 15:00:02]: MYSQL service is offline.
    [06/07/10 15:00:02]: Restarted MYSQL service (2 MYSQL events today).
    When I look at the mysql server error log (/var/lib/mysql/sername.err), it shows:
    Code:
    100607 14:56:05 [Note] /usr/sbin/mysqld: Normal shutdown
    
    100607 14:56:07  InnoDB: Starting shutdown...
    100607 14:56:08  InnoDB: Shutdown completed; log sequence number 0 967348092
    100607 14:56:08 [Note] /usr/sbin/mysqld: Shutdown complete
    
    100607 14:56:08  mysqld ended
    
    100607 14:56:09  mysqld started
    Is there some other logs that we can look at, or enable, that will help us to figure out why this is happening? Is there some other kind of monitoring that we can install that will help us find this issue?

    Any help with this would be greatly appreciated!

    Doug

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    When you say you're using SIM, I assume you mean this.

    That app does have automatic restart functionality built in, and although I've never used it, I would check to make sure you don't have any settings enabled for restarting the MySQL daemon based on an arbitrary threshold such as number of connections or response time.
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

  3. #3
    Member
    Join Date
    Jan 2010
    Location
    Denver, CO, USA
    Posts
    8

    Default

    Yes, System Integrity Monitor is what I meant, sorry for being unclear.

    We saw that SIM had the ability to restart services. We don't have a problem with it restarting things, if it is necessary, but we are wanting to know why it is happening.

    We are trying to determine, if it is SIM that is restarting things, why does it think that mysqld needs to be restarted? The sim logs don't really give any useful information for this purpose.

    Looking at other log files, our web application is running just fine up to the point where mysql is getting restarted, and then after MySQL is again running. The only reason for any problems with our application, is because mysql is being restarted. It runs without issues before and after the restart.

    The system load is not very high (0.5 or less). The server has 4GB of ram, with about 3GB free, so it shouldn't be a memory issue. Munin is enabled, and none of the charts show anything out of the ordinary at the times when MySQL is being restarted.

    Any other thoughts of things that we can look into to try and determine why this is happening?

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Check SIM settings as suggested? (I've never used it)
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

  5. #5
    Member
    Join Date
    Jan 2010
    Location
    Denver, CO, USA
    Posts
    8

    Default

    Garret,

    Thanks for the suggestion, but we have been through the configuration for SIM, and we are not able to determine how to update the information it is giving us, without rewriting the mysql.chk script that SIM is using.

    It appears to just be a shell script, so that might be our next step, but I was not wanting to start rewriting tools, if there was something or somewhere else that we should have been checking.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by mcn_doug View Post
    Garret,

    Thanks for the suggestion, but we have been through the configuration for SIM, and we are not able to determine how to update the information it is giving us, without rewriting the mysql.chk script that SIM is using.

    It appears to just be a shell script, so that might be our next step, but I was not wanting to start rewriting tools, if there was something or somewhere else that we should have been checking.
    I had a quick look through the SIM config and it doesn't appear that there is anything in there that would restart MySQL based on the thresholds I was mentioning.

    With that said, try eliminating SIM as a source of the random restarts by temporarily disabling it's cron job and letting the time pass when these random restarts usually occur. You can toggle the cron job off/on using (according to the README):

    Code:
    # /usr/local/sbin/sim -j
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

Similar Threads & Tags
Similar threads

  1. MySQL randomly restarting
    By mcn_doug in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-08-2010, 06:28 PM
  2. Need help, Mysql Restarting itself
    By garse in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-15-2007, 02:58 PM
  3. mysql keeps restarting
    By cyo in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-22-2005, 03:32 AM
  4. Error when restarting MySQL
    By Jeff75 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-27-2004, 01:30 PM
  5. MySQL not restarting up...
    By JohnH in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-08-2002, 05:41 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube