1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error: Log is currently being processed in the background. Cannot update.

Discussion in 'General Discussion' started by sneader, May 27, 2011.

  1. sneader

    sneader Active Member

    Joined:
    Aug 21, 2003
    Messages:
    1,083
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    La Crosse, WI
    Customers are randomly reporting seeing the error "Error: Log is currently being processed in the background. Cannot update." when they try to manually update their statistics in AWStats.

    If I run their stats manually, using /scripts/runweblogs username, they update fine with no errors, and it looks good to the customer for a while, but eventually they will report the same problem again.

    I DO have "statistics processing times" disabled for 8am through 5pm. Is it possible that customers cannot manually update their stats from 8am-5pm, and receive the error above, because I've disabled processing 8am-5pm?

    - Scott
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,319
    Likes Received:
    8
    Trophy Points:
    38
    This is the performed using the Update button AWstats provides, correct?

    Also, your server is running 11.28, correct?
     
  3. sneader

    sneader Active Member

    Joined:
    Aug 21, 2003
    Messages:
    1,083
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    La Crosse, WI
    Yes on both. Thanks Kenneth!

    Customer just reported that during the day (even during 8am-5pm) he was able to manually click the update stats button within AWStats and get updated stats, but now today it results in the error, when clicked.

    - Scott
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,319
    Likes Received:
    8
    Trophy Points:
    38
    If I recall correctly, when we overhauled stats processing in 11.25 we added code to AWstats so it would not attempt to process the Apache logs while cpanellogd is. If you look at the domlogs for the domain in question you should find a bkup file present. For example if the domain is example.com, you would find:

    /usr/local/apache/domlogs/example.com.bkup

    Please let me know if that is what you find.

    cpanellogd should remove that bkup file when it is done processing.
     
  5. sneader

    sneader Active Member

    Joined:
    Aug 21, 2003
    Messages:
    1,083
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    La Crosse, WI
    Indeed, I see this:

    -rw-r----- 1 root exampcom 13126 May 27 04:56 example.com.bkup

    Looking at running processes, I see cpanellogd, but it says it's sleeping:

    root 9515 0.0 0.0 4884 1736 ? SN Apr18 0:00 cpanellogd - sleeping for logs
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,319
    Likes Received:
    8
    Trophy Points:
    38
    After discussing this with one of the dev's, here is some information about what is happening.

    As of version 11.25 we patch AWstats to be aware of the bkup files. This prevents problems with AWstats and cpanellogd processing data, and AWstats receiving data out of order (among other problems).

    When cpanellogd begins processing logs, it checks whether it woke up during a blackout period. If not it will determine which users and logs to process. Depending upon your configuration, cpanellogd will then create a bkup copy of each log it will process.

    Once it completes making the bkup copy, it signals splitlogs or Apache to restart.

    The next thing it does is checks to determine whether the blackout period started. In fact it does this check rather regularly as it processes each log. If a blackout period did start, then cpanellogd will go to sleep. It periodically wakes up and checks whether the blackout period ended.

    When the blackout period ended cpanellogd will begin processing the bkup files.

    Based upon the above I posit that cpanellogd started processing logs for the user domain, then the blackout period started. Until the blackout period comes to an end, cpanellogd will not process the bkup logs. Likewise AWstats will be blocked from performing a realtime update for the domains that have bkup files present.
     
  7. sneader

    sneader Active Member

    Joined:
    Aug 21, 2003
    Messages:
    1,083
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    La Crosse, WI
    Thanks Kenneth!

    It would be nice if customers could still manually update AWStats, even with blackout windows enabled. i.e. I don't necessarily want to waste CPU processing stats during the middle of the day (especially since many customers don't use the stats or don't care). But if a customer IS using them and wants to force an update... giving them this "useless" error just leads to frustration.

    What are my options at this point? I'm thinking the only option is to re-enable stats processing 24x7?

    - Scott
     

Share This Page