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

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
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
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
This is the performed using the Update button AWstats provides, correct?

Also, your server is running 11.28, correct?
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
This is the performed using the Update button AWstats provides, correct?

Also, your server is running 11.28, correct?
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
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
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.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
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
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
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.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
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