High CPU usage occurs during Plesk Daily Maintenance execution time

Created:

2017-04-23 21:53:43 UTC

Modified:

2017-08-08 13:45:35 UTC

0

Was this article helpful?


Have more questions?

Submit a request

High CPU usage occurs during Plesk Daily Maintenance execution time

Applicable to:

  • Plesk for Linux

Symptoms

High CPU usage occurs during Plesk Daily Maintenance execution time. The process like the following one consumes all the CPU:

20936 ?  RN    0:19  \_ /usr/bin/perl /usr/lib64/plesk-9.0/logresolvemerge /var/www/vhosts/system/example.com/logs/access_log /var/www/vhosts/system/example.com/logs/access_log.webstat

Plesk Administrator start receive the notification mails from Health Monitor about high Apache CPU usage and sw-engine processes are in top

All the domains that use AWstat as webstatistics tool have access_log.webstat files with non-zero size, for some of them it can be about several GBs

Cause

AWstats package is corrupted or installed from 3rd-party repository. As a result, access_log.webstat are not being processed properly and its size increase permanently. Parsing of such files during execution of DailyMaintenance consumes a lot of CPU.

Resolution

  1. Disable 3rd-party repositories in /etc/yum.repos.d/ directory and re-install AWstats feature using Plesk installer.

  2. Find all the domains that use AWstat:

    # plesk db -Nse "select d.name from domains d, hosting h where d.id=h.dom_id and h.webstat='awstats';" > /root/awstat_doms.txt
    
  3. Truncate files to zero size:

    # while read dom; do echo -n > /var/www/vhosts/system/*/logs/*.webstat ; done < /root/awstat_doms.txt
    
Have more questions? Submit a request
Please sign in to leave a comment.