PDA

View Full Version : Webstats update cause CPU error?



Hercules
04-10-2007, 07:06 AM
For the first time I saw a CPU error today caused by what I think the daily webstats update.
The CPU error log starts with 50 lines like this:

-Tue Apr 10 02:44:27 2007: used 0.01 seconds of cpu time for /usr/local/cpanel/3rdparty/bin/english/webalizer -N 10 -D /home/kuikensc/tmp/webalizer/dns_cache.db -R 250 -p -n kuikens.com -o /home/kuikensc/tmp/webalizer /usr/local/apache/domlogs/kuikens.com

0.01 secs, so no problem, but then 12 of these lines start popping up with an average of 2,8 secs:

-Tue Apr 10 02:46:17 2007: used 4.83 seconds of cpu time for /usr/local/cpanel/3rdparty/bin/english/webalizer -N 10 -D /home/kuikensc/tmp/webalizer/dns_cache.db -R 250 -p -n kuikens.com -o /home/kuikensc/tmp/webalizer /usr/local/apache/domlogs/kuikens.com

And to finish the job I get 5 more of these lines average 9.2 secs:

Tue Apr 10 02:48:08 2007: used 9.23 seconds of cpu time for /usr/bin/perl /usr/local/cpanel/3rdparty/bin/awstats.pl -config=kuikens.com -update

Thats around 85 CPU secs within 2 mins so the site gets a 5 min suspension.
But I've had the same webstats for almost 2 years now, but there never was a problem.
Did all you guys get this error today or was only my box 214 unlucky or only my domain?

wallaceb
05-05-2007, 10:53 PM
no, i have had this exact same problem, so i simply turned off awstats.

i too used them for quite a while without problems, but one day they started to mess up.

Hercules
05-06-2007, 02:37 PM
BH told me that this happened because the raw access logs are growing to big with busy sites (>1GB!).
It takes a lot of CPU resources to convert them to awstats.
Luckily every few weeks they are cleaned up.
Problem only occurs with very heavy traffic sites.

hofmax
05-06-2007, 02:55 PM
I see, can you give us an estimate of what constitutes a "very high traffic" site. Just in case :rolleyes:

charlesgan
05-06-2007, 07:15 PM
i been reading few times already that stat log, webstats or awstat is using too much cpu. i also consider to disable that ... and apply external logging soon. dont want this to affect the website uptime. ;)

borderline
05-07-2007, 03:24 AM
i been reading few times already that stat log, webstats or awstat is using too much cpu. i also consider to disable that ... and apply external logging soon. dont want this to affect the website uptime. ;)


what do you mean by external logging? something like StatCounter?

at this rate, we are not gonna be able to breath at bluehost without causing a CPU problem :(

hofmax
05-07-2007, 05:57 AM
what do you mean by external logging? something like StatCounter?

at this rate, we are not gonna be able to breath at bluehost without causing a CPU problem :(

Yes, but there's a trade off. Stats systems that have log access are more accurate.

In theory you could export your raw access logs to another server periodically and then run a stats program over there (like AwStats).