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.

Help on mysql hostname log error

Discussion in 'General Discussion' started by ultralion, Sep 18, 2013.

  1. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator
    Hi :)
    Today i had some issue on my hosting. My vps was down so i suppose my provider give them an hard reset to make it workly.
    After that some table on a cms were broken (regarding sessions). So i fix them and then i move to:
    /var/lib/mysql to see error generated in the logs.
    I check what was happening on that website log... BUT
    with my surprise i've seen a 1GB log size of "myhostname.err" :eek::eek:
    So i suppose this log is not rotating. How i can solve this? I can brutally remove this file or there are some commands to clean it??
    Many Thanks
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I suggest you rename it,
    mv myhostname.err myhostname.err.OLD
    and then restart mySQL.

    Then you should find out why the file is so big.
     
  3. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator
    i see but then i could delete it? file .err come generate again itself?
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    You could rename it to be able to see the errors in it.
     
  5. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator
    well done. Right now i din't opened large file
    but i can see just a new log was immediatly created and it contains
    130918 14:46:44 [ERROR] /usr/sbin/mysqld: Table './cphulkd/logins' is marked as crashed and should be repaired
    How i can fix that?
     
  6. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator

    well right now i fixed that table simply with phpmyadmin.
    Seems that new one log file ins't updating anymore.
    The huge file contains at last ever this message (so i suppose is broken since many time).
    I've 2 questions...
    -How possible this table broken itself? I read could be also the cron -upcp that run everynight on my server automatic??
    -Now is safe to delete the previously error log file with .OLD extension to save space on my vps?
    Thanks again
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Yes, the previous log file is not required so it's safe to remove it. There are several potential reasons why the "cphulkd" database can become corrupted. It's possible the database was not shut down successfully, or MySQL was killed during a write. The best way to resolve this issue is to simply repair the database. EX:

    Code:
    mysqlcheck --repair cphulkd
    Thank you.
     
  8. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator
    Ok many thanks. Last question.. i check also Apache errors log and seems huge too now i'm going to ispectioning them.
    I can do same procedure renaming these files then restarting apache?
    the files are:
    suphp log 250MB
    error log 109MB
    These files are rotating or not? Many thanks again
     
  9. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Can be done in WHM also:
    WHM -> SQL Services -> Repair a MySQL Database

    - - - Updated - - -

    Yes.

    See in :
    WHM -> Service Configuration-> Apache Configuration-> Log Rotation
     
  10. ultralion

    ultralion Well-Known Member

    Joined:
    Nov 14, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Viareggio
    cPanel Access Level:
    Root Administrator
    Many thanks quietFinn
    In fact i've seen they are rotating but max filesize is 300MB so its explain their size.
    I'm a newbie on cpanel so i think never take a look on this logs for months :( vps is working without issues so i didn't care.
    Since now i will take a look also if these files are increasing continuously or if are single warning/issues occourred in a long time.
    Thanks again!
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To note for others that may view this thread, the "Log rotation size threshold" value is adjustable under the "Stats and Logs" tab in:

    "WHM Home » Server Configuration » Tweak Settings"

    Thank you.
     
Loading...

Share This Page