A tarefa cron 'AWstats.pl' do AWStats leva mais de 24 horas

1

Temos problemas com a tarefa em segundo plano do AWStats lendo o arquivo access.log : os scripts awstats.pl levam mais de 24 horas e parece que nunca termina.

Temos um site que tem mais de 8 milhões de visualizações de páginas por dia, gerando um arquivo 2 GB Apache access.log todos os dias.

Aqui está o log de comando quando tentamos executar manualmente os scripts awstats.pl :

root@hostname:~# /usr/lib/cgi-bin/awstats.pl -config=org.mysite -update

Create/Update database for config "/etc/awstats/awstats.org.mysite" by AWStats version 7.4 (build 20150714)
From data in log file "/var/log/apache2/org.mysite-access.log"...

Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it from beginning of log file...

Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
Flush history file on disk (unique url reach flush limit of 5000)
^C

Usamos ctrl+C para parar aqui, uma vez que foi tirado mais de 1 hora.

Tentamos desativar a pesquisa de DNS (definida como 0 ), mas não ajudou:

Edite o arquivo /etc/awstats/awstats.org.mysite.conf

 # 0 - No DNS Lookup
 # 1 - DNS Lookup is fully enabled
 # 2 - DNS Lookup is made only from static DNS cache file (if it exists)
 # Default: 2
 DNSLookup=0

O hardware não deve ser o gargalo, é o HOST-128L servidor dedicado

  • Intel Xeon D-1520 - 4 núcleos / 8 segmentos
  • 128 GB DDR4 ECC 2133 MHz
  • 2 x 480 GB / SSD

O sistema operacional é o Ubuntu 16.04.3 LTS

root@hostname:~# cat /etc/*-release

NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
VERSION_CODENAME=xenial

Então,

  1. Temos alguma coisa a fazer para melhorar o desempenho do AWStats?
  2. Ou estamos atingindo o limite de desempenho do AWStats?
por Amos 24.08.2017 / 09:01

0 respostas