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.

AWSTATS high load fix

Discussion in 'General Discussion' started by gunmuse, Oct 28, 2007.

  1. gunmuse

    gunmuse Well-Known Member

    Joined:
    Jul 3, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Mexico
    Many of you may or may not know that when awstats runs it can and often does cause an extremely high load.

    The good news is I found the problems and know the fix but Cpanel keeps overwriting them and there doesn't seem to be a mass way to update all users at once.

    First Permission problems with the Domlogs to allow for purging when run by the users who update frequently and if you as host allow them to update via the browser.

    /usr/local/apache/domlogs/*.com These files need to have permissions to run from a CGI script if that option is enabled.

    /home/USER/tmp/awstats/awstats.USER.COM.conf

    PurgeLogFile=1 Its way down at the bottom of the config file in the optional section.

    Basically what it does is prevent the server from having to read the 50,000 lines from the days and weeks before each time Awstats updates which is usually daily.

    Awstat updates were causing my server to reach 100% load at times just processing the logs on high traffic sites.


    I am not submitting a TT or feature to CPANEL if you one of you zealots wish to please do. This little small modification to the User files can save tons of midnight loads and file lock errors when too much gets going on while the stats program runs.
     
  2. gunmuse

    gunmuse Well-Known Member

    Joined:
    Jul 3, 2003
    Messages:
    98
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Mexico
    You know I thought I would fool cpanel and switch to edge settings and manual update. Yet it still autoupdated last night and the crazy format conflict of the logs still happening froma few cpanel updates back.
     
  3. richenou

    richenou Well-Known Member
    PartnerNOC

    Joined:
    Feb 17, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    hi
    I have this problem too

    cpu use 100%

    but I have 1000 accounts on my server

    how to fix all?

    thx
     
  4. richenou

    richenou Well-Known Member
    PartnerNOC

    Joined:
    Feb 17, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    up
    plz no ideas?
     
  5. gkgcpanel

    gkgcpanel Well-Known Member

    Joined:
    Jun 6, 2007
    Messages:
    217
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Have this problem too...

    We're having this issue too, with thousands of customers that will take some time to fix manually. How about simply disabling awstats completely? If we disable it for all users, then it shouldn't be an issue any longer right???

    Thanks,
    Peter
     
  6. serg

    serg Member

    Joined:
    May 30, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    As for me - I prefer AWStats instead of Webalizer etc.
    Therefore I don't think that it is a good idea to remove it from CPanel...

    First of all YOU ARE ABLE to turn AWStats OFF
    Login to WHM!
    "Statistics Software Configuration" and "Tweak Settings" will help you with it.

    If you want to have AWStats but don't know how to avoid big load -
    just tweak things up via WHM "Tweak Settings"
    1. "Number of days between processing log files and bandwidth usage (default 1, decimal values are ok)" - set it so that the most visited site won't get more than 100'000 hits between stats run. 1 is ok for low traffic servers.
    2. Delete each domain's access logs after stats run - check it and you won't need to set PurgeLogFile=1 manually
    3. The load average above the number of cpus at which logs file processing should be suspended (default 0) - this setting will help you to avoid big loads as well

    Moreover,
    awstats config is generated for every website right before stats runs,
    the template is /usr/local/cpanel/etc/awstats.conf so you are able to do some modifications there and it will be applied to ALL domains AUTOMATICALLY. But note that this file will be overwritten every time cpanel upcp runs (if no immutable flags set).
     
Loading...

Share This Page