Articles in this section

Plesk .webstat log files are growing big

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • The .webstat logs in /var/www/vhosts/example.com/logs directory are growing big (several GB)

  • Manual statistics recalculation returns errors:

    # plesk sbin statistics --calculate-one --domain-name=example.com
    WARN: WARNING during statistics_collector execution: statistics_collector[32568]: Log rotation `/usr/local/psa/logrotate/sbin/logrotate /usr/local/psa/etc/logrotate.conf -s /usr/local/psa/var/logrotate.status' failed with code 1.
    Stdout:
    Stderr:error: error creating output file /var/www/vhosts/system/example.com/logs/access_ssl_log.processed.1: File exists

Additional symptoms:

  • AWStats has been installed using Plesk installer
  • Daily Cron task is executed on a daily basis
  • No duplicate Cron tasks on the server
  • Plesk might have been upgraded to Obsidian recently (Optional).

Cause

Incorrect AWstats paths are set in the /etc/psa/psa.conf file. For example:

# grep AWSTATS /etc/psa/psa.conf
AWSTATS_ETC_D /etc/awstats
AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin
AWSTATS_TOOLS_D /usr/share/awstats/tools
AWSTATS_DOC_D /var/www/html/awstats

Resolution

Set the correct paths in the configuration file as follows:

  1. Connect to the server via ssh

  2. Open /etc/psa/psa.conf file with a text editor

  3. Reset all AWSTATS paths in this file to their default values:

  • On Debian/Ubuntu:

    # grep AWSTATS /etc/psa/psa.conf
    AWSTATS_ETC_D /etc/awstats
    AWSTATS_BIN_D /var/www/cgi-bin/awstats
    AWSTATS_TOOLS_D /usr/share/awstats
    AWSTATS_DOC_D /var/www/html/awstats

  • On RHEL/AlmaLinux/RockyLinux/CloudLinux:

    # grep AWSTATS /etc/psa/psa.conf
    AWSTATS_ETC_D /etc/awstats
    AWSTATS_BIN_D /usr/share/awstats/wwwroot/cgi-bin
    AWSTATS_TOOLS_D /usr/share/awstats/tools
    AWSTATS_DOC_D /usr/share/awstats/wwwroot

Was this article helpful?

Comments

1 comment
Date Votes
  • What about the huge log file? Specifically 'access_ssl_log.webstat', can this be deleted after correcting these paths?

    0

Please sign in to leave a comment.