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.

Check out /usr/local/cpanel/logs/ !!!

Discussion in 'General Discussion' started by H2Hosting.com, Mar 14, 2003.

  1. H2Hosting.com

    H2Hosting.com Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Check out /usr/local/cpanel/logs/ !!!

    File stats_log is 2Gb! 2.147.483.647

    ERROR: illegal attempt to update using time 1046782149 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782235 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782272 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782332 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782490 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782710 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782865 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046782886 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046783008 when last update time is 1047560796 (minimum one second step)
    ERROR: illegal attempt to update using time 1046783225 when last updat

    2gb limit here ;(

    On another server ~1.9Gb (1.954.178.437) and the limit will be reached in 1h or less.

    ... @&?^%%!
     
    #1 H2Hosting.com, Mar 14, 2003
    Last edited: Mar 14, 2003
  2. H2Hosting.com

    H2Hosting.com Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    The same error on second server when I

    tail -f stats_log

    ERROR: illegal attempt to update using time 1047067617 when last update time is 1047593081 (minimum one second step)
    ERROR: illegal attempt to update using time 1047067671 when last update time is 1047593081 (minimum one second step)
    ERROR: illegal attempt to update using time 1047067696 when last update time is 1047593081 (minimum one second step)

    I killed cpanellogd process on all servers ...... as it create huge log file with errors...
     
    #2 H2Hosting.com, Mar 14, 2003
    Last edited: Mar 14, 2003
  3. mitul

    mitul Well-Known Member

    Joined:
    Feb 8, 2003
    Messages:
    291
    Likes Received:
    0
    Trophy Points:
    16
    what was the last upgradation done on the server?
     
  4. FWC

    FWC Well-Known Member

    Joined:
    May 13, 2002
    Messages:
    354
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ontario, Canada
    The "last upgradation" is what is doing this to all of us... :(
     
  5. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Do this:

    rm /usr/local/cpanel/logs/stats_log
    touch /usr/local/cpanel/logs/stats_log
    /etc/rc.d/init.d/cpanel3 restart

    That will reset the stats_log and the log processing daemon. It's not a permanent solution - the stats_log grows each day and doesn't seem to be rotating on its own any longer, so you'll need to keep an eye on it or just send the results to /dev/null if you don't need the logs for troubleshooting purposes (this is what we're doing).
     
  6. FWC

    FWC Well-Known Member

    Joined:
    May 13, 2002
    Messages:
    354
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Ontario, Canada
    I followed all your advice, Annette. Things are working much better now. Thank you. :)
     
  7. EcpHosting

    EcpHosting Well-Known Member

    Joined:
    Dec 16, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Yes, this caused all of our servers to put some serious weight on disk space and on server MAX out the main HD. Grr... and this is CPanels STABLE release?
     
  8. ozzi4648

    ozzi4648 Guest

    Why dont you add it to logrotate.conf as a daily rotation? No need to delete and touch anything!
     
  9. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Keep Stats Log (/usr/local/cpanel/logs/stats_log) between cpanel restarts (default is off)
    Stats Log Level (default is 1) [0...5]:

    I've added two options to the EDGE builds which should take care of this.
     
  10. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    You might want to check the system time since you may have a clock skew.

    rdate -s rdate.darkorb.net

     
  11. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, Nick, for tweaking the logfile size/retention. You're a prince among men.
     
  12. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Nick,

    I did the

    rdate -s rdate.darkorb.net

    but it didn't work. cpanellogd dumps a LOT of

    ...
    ERROR: illegal attempt to update using time 1047817297 when last update time is 1047887171 (minimum one second step)
    ERROR: illegal attempt to update using time 1047817359 when last update time is 1047887171 (minimum one second step)
    ...

    on /usr/local/cpanel/logs/stats_log

    and uses a LOT of CPU at that. I have to restart cpanel3

    /etc/init.d/cpanel3 restart

    so it can stop using up CPU and the stats_log goes back to show normal stats processing messages. But after a few hours, I see that the CPU usage at my server is high again (2-4%), and it's cpanellogd with those update time messages!!! That did not happen in earlier cpanel versions, what's up?

    -Dario
     
  13. EcpHosting

    EcpHosting Well-Known Member

    Joined:
    Dec 16, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    This seems to be a problem for all of us. Any reports on this?

    We have done the rdate -s rdate.darkorb.net.. but what exactly does this do?
     
  14. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    That command synchronizes the server time with darkorb's. It does NOT work, though.

    Here's what I did to patch the situation: I created the following script and placed it under crontab running every minute:

    #!/bin/bash

    str=`tail -1 /usr/local/cpanel/logs/stats_log | cut -c -43`
    if [ "$str" == "ERROR: illegal attempt to update using time" ]
    then
    /etc/init.d/cpanel3 restart
    fi

    What it does is find out if cpanellogd is "locked up" (again!) and restarts the cpanel services, which resets cpanellogd CPU usage to a normal level.

    I sure hope to see a real solution to this problem, though.

    -Dario
     
  15. dandanfireman

    dandanfireman Well-Known Member
    PartnerNOC

    Joined:
    May 31, 2002
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Date sync is not the problem. We need a resolution to this Nick.
     
  16. dandanfireman

    dandanfireman Well-Known Member
    PartnerNOC

    Joined:
    May 31, 2002
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    This appears to be fixed in the current edge release. Give it a shot.
     
  17. nsr81

    nsr81 Member

    Joined:
    Mar 31, 2002
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Pipe it to /dev/null , seemed easy enough to us instead of running a cronjob.
     
  18. dariofg2

    dariofg2 Well-Known Member

    Joined:
    Mar 7, 2003
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    The size of the log is not the concern, it's cpanellogd using up CPU like crazy. Piping to /dev/null won't fix that.
     
  19. OneSizeFitsAll

    OneSizeFitsAll Well-Known Member

    Joined:
    Dec 19, 2002
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    I see this option (presently unckecked) in my WHM. Could someone explain me:
    What will happen if I check this option...?
    What is this option actually logging?


    Regards,
     
Loading...

Share This Page