Symptoms
- CentOS/RHEL installed on the server
- 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 receives 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.
- Awstats might be installed from Fedora:
# rpm -qi awstats | grep Vendor
Vendor : Fedora Project
Cause
AWstats package is corrupted or installed from 3rd-party repository. As a result, access_log.webstat files are not being processed properly and its size increases permanently. Parsing of such files during execution of DailyMaintenance consumes a lot of CPU.
Resolution
Warning: This solution is required knowledge in server administration. Contact server administrator if help is required to apply the resolution below.
- Connect to the server using SSH.
- Disable 3rd-party repositories in
/etc/yum.repos.d/
directory - Re-install AWstats feature using Plesk installer.
Click on a section to expand
If solution does not help::
- Connect to the server via SSH
-
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
-
Truncate files to zero size:
# for i in $(cat /root/awstat_doms.txt); do echo -n | tee /var/www/vhosts/system/${i}/logs/*.webstat ; done