• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question access_log.webstat growing huge!

theWoosh

Basic Pleskian
I know this has been a perennial problem and I have scoured the web, but it was supposed to have been solved in plesk 11...

I have one vhost whose access_log.webstat files (both in the system and regular domain directories) have grown to 20GB (each!)...

I presume that the daily cleanup and rotation routines are not working properly but how do I fix the problem?

I am using plesk 12.5 (but it has been upgraded over a couple of years), ubuntu 14.04...
 
Hi theWoosh,

pls. consider to use the previous suggestions from this forum: => #2

If you still experience issues as described, pls. consider to tell us "step-by-step", what you did to solve the issue, so people willing to help you could help you with further investigations and suggestions. :)
 
Hi Thanks for responding...
I have tried the following from that thread:
/usr/local/psa/admin/sbin/statistics --calculate-one --domain-name=<your_domain_name_here>
...and...
/usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.d/<your_domain_name_here>
...but the big files still remain. I then saw they were set to 600 so chmod'd them to 644 as suggested, but I don't know this would make any diff as I was running as root...
logrotate when run again hasn't made any difference so I have started the statistics --calculate-one again but it takes some hours!
 
no change to the access_log.webstat files after retrying the two commands above... any other suggestions anyone?
 
Hi theWoosh,

you could consider to use a command like:

Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -Ne"select d.name from domains d join hosting h on h.dom_id=d.id where h.webstat='none'"|while read d; do > /var/www/vhosts/system/$d/logs/access_log.webstat;done
... which selects domains with web-statistics usage set to "none". In addition, it will cut the "access_log.webstat" files to zero for these domains.

Your described issue seems to be a resistent bug from Plesk 11.x on your server, which should have been fixed by now.
The access_log.webstat file could grow large if web statistics for domains were switched off. (PPPM-1115)
 
Thanks for your help UFHH01 - this appeared to have no effect whatsoever (except a warning that using the password on the command line was insecure)...
I did see the previous suggestion while trawling the wb but didn't try it since In the plesk control panel it says Awstats is on for this domain...
 
Hi theWoosh,

did you consider to switch to "Webalizer" and backwards to "AwStats", to see if this solves your issue?
 
Thanks for your suggestion - I switched to webalizer for that domain in the plesk control panel and then back again after a minute or so but the files are still there and just as big!
One thing I didn't try was reinstalling awstats. Can you give me a clue how I could do that? I couldn't find the details for using the plesk installer for this... (and I can bet that I can't use apt!)
 
One thing I didn't try was reinstalling awstats. Can you give me a clue how I could do that?
# plesk installer --select-release-current --remove-component awstats
# plesk installer --select-release-current --install-component awstats
 
Hi Thanks for your help.
I tired uninstalling and reinstalling awstats but nothing changed.
implemented debug log as per How to enable/disable debug logging in Plesk 11.5 and higher for Linux
set logrotation to 40k (rather than daily) on plesk – accessed the site a bit then ran:
# /usr/local/psa/admin/sbin/statistics --calculate-one –domain-name= domain.com
...which takes an age... then ran:
# /usr/local/psa/admin/bin/web_statistic_executor
which has been running for some hours. Wants really interesting (and slightly worrying) about it is that it is eating disk space as it runs - it appears to be going up to 99% capacity and then clearing disk space and continuing again - it is slightly worrying to watch - I'm scared to leave it in case it just uses the whole disk and processes start to fail!
Will report back when it's finished...
 
Finally finished, without errors, but no change... I still have the following files:
-rw------- 1 root root 20G May 24 13:05 /var/www/vhosts/system/<domain>/logs/access_log.webstat
-rw------- 1 root root 20G May 24 10:27 /var/www/vhosts/<domain>/logs/access_log.webstat

.. is it a problem that they are back to chmod 600? I did change them to 644 a few days back ( as suggested elsewhere).
I would really appreciate some more ideas as I am desperately short of space!
 
so I can see my accesses getting logged in access_log and all the rotated versions are in access_log.processed.n - why do I need access_log.webstat? What if I just delete it?...
 
Try to run:

statistics —calculate-one in order to rotate access_log.webstat in domain/logs

and

web_statistic_executor in order to rotate access_log.webstat in system/logs

For your case it should be like

# /usr/local/psa/admin/sbin/web_statistic_executor --calculate-domain domain.com
 
Back
Top