The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql restart every night same time

Discussion in 'General Discussion' started by xml, Dec 2, 2008.

  1. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    hello

    i noticed mysql keep restarting every night at 10:02 pm every day in the past few days

    here is mysql.log

    any idea what cousing this problem
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    You might look in the /var/log/cron file and see if anything is restarting mysql or check any scripts that could be doing it comparing it to 10 pm
     
  3. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I have same problem, this issue started to happen after upgrade to mysql 5.0.67. I have checked crontab and cron logs and there is no mysql entry.

    Mysql server restarts every night at 2:00 AM.
     
  4. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    i noticed when i start getting this problem i dont get any emails from daily /scripts/upcp

    so i run /scripts/upcp manually and the output contain lot of this error lines:
    error: db4 error(22) from db->close: Invalid argument
    error: cannot open Installtid index using db3 - Cannot allocate memory (12)


    the fix for my problem was in this post:

    http://forums.cpanel.net/showpost.php?p=203723&postcount=2
     
  5. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    I have tried your suggestion but that doesn't help.
     
  6. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    Bono,
    What are the errors in your mySQL error log?
    Check it out - your error log is available under /var/lib/mysql/`hostname`.err

    I believe the original error posted by the OP related a crashed corrupt table.
    This resulted in errors when the mySQL user trying to "SORT" records.

    The direct fix would've been do a server-wide myisamchk -r - to repair all MYI files.
    ie. find /var/lib/mysql -name *.MYI | xargs myisamchk -r

    I don't honestly think it related a corrupt RPM database?? Not sure where that came from..
    Who knows. maybe some information was indirectly truncated.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    A corrupt RPM database could result in MySQL being installed in correctly. For example a mixture of files from different versions of MySQL.
     
  8. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    This is what i got in log file:

    Code:
    081211  1:55:06 [Note] /usr/sbin/mysqld: Normal shutdown
    
    081211  1:55:08 [Note] /usr/sbin/mysqld: Shutdown complete
    
    081211 01:55:08  mysqld ended
    
    081211 01:55:15  mysqld started
    ^G/usr/sbin/mysqld: File '/var/log/log_slow_queries.log' not found (Errcode: 13)
    081211  1:55:15 [ERROR] Could not use /var/log/log_slow_queries.log for logging (error 13). Turning logging off for the whole durat$
    081211  1:55:16 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.67-community-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
    081211  1:55:20 [Note] /usr/sbin/mysqld: Normal shutdown
    
    081211  1:55:22 [Note] /usr/sbin/mysqld: Shutdown complete
    
    081211 01:55:22  mysqld ended
    
    081211 01:55:22  mysqld started
    I repeat this started to happen after cpanel upgraded mysql from 5.0.51 to 5.0.67
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Please open a support ticket with use so we can determine what is causing this and resolve the issue. Thank you.
     
  10. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    How to get account? I got my license from theplanet web hosting company.
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    For this issue, you can submit a support ticket at: http://tickets.cPanel.net/submit and select the option to proceed without logging in (at the bottom of the page)
     
  12. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Looks like mysql is restarted after upcp finishes it's task.

    54 1 * * * /scripts/upcp

    So in my case every night at 1:55 mysql is restarted.

    Code:
    081212  1:55:23 [Note] /usr/sbin/mysqld: Normal shutdown
    
    081212  1:55:25 [Note] /usr/sbin/mysqld: Shutdown complete
    
    081212 01:55:25  mysqld ended
    
    081212 01:55:27  mysqld started
    081212  1:55:27 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.67-community-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Edition (GPL)
     
  13. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator

    You should still have a support access number listed WHM >> Main >> Support >> Support Center
     
  14. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Hi,

    We choose to manually update cPanel so we can be right there in case something happens that affects us which must be why do not see the same behavior you are seeing.
     
  15. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Thanks i will do that since cPanel script is obviously broken.
     
  16. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Or your system is broken. What happens when you execute /scripts/mysqlup ?
     
  17. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Sure i got 20 boxes and only on this one i got cPanel and it's broken. Like i said since my mysql build was upgraded from 5.0.51 to 5.0.67 restarts start every night.

    I ran that script and my build is already up to date, everything went fine and it restarted my mysql server.
     
  18. Bono_

    Bono_ Active Member

    Joined:
    Sep 20, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    This problem is fixed thanks to Kyle P.

    Two versions of mysql were installed. Don't know how updater managed to accomplish that.

    Code:
    rpm -qa  |grep -i mysql
    MySQL-devel-5.0.51a-2.glibc23
    
    MySQL-server-5.0.67-0.glibc23
    MySQL-server-5.0.51a-2.glibc23
    MySQL-client-5.0.51a-2.glibc23
    
    MySQL-devel-5.0.67-0.glibc23
    MySQL-shared-5.0.67-0.glibc23
    MySQL-shared-5.0.51a-2.glibc23
    
    MySQL-bench-5.0.67-0.glibc23
    MySQL-bench-5.0.51a-2.glibc23
    
    MySQL-client-5.0.67-0.glibc23 
     
Loading...

Share This Page