High CPU load during statistics calculation

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:50:21 UTC

Modified:

2017-02-06 20:42:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

High CPU load during statistics calculation

Symptoms

CPU load is very high during Daily Maintenance task execution, specifically on ExecuteStatistics task:

# /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php -f ExecuteStatistics

statistics_collector and rsyslogd proccesses consume about 100% of CPU time and statistics calculation fails:

# /usr/local/psa/admin/bin/statistics --calculate-one -d example.com
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 256114684 bytes) in /opt/psa/admin/plib/Service/Agent/Transport/Util.php on line 189

Additilionally, upon tracing the statistics_collector process the following messages are observed:

writev(2, [{"statistics[1855]: Unable to pars"..., 67}, {"\", 1}], 2) = -1 EPIPE (Broken pipe) sendto(5, "<27>Jun 10 03:05:13 statistics[1"..., 87, MSG_NOSIGNAL, NULL, 0) = 87writev(2, [{"statistics[1855]: Unable to pars"..., 67}, {"\", 1}], 2) = -1 EPIPE (Broken pipe) sendto(5, "<27>Jun 10 03:05:13 statistics[1"..., 87, MSG_NOSIGNAL, NULL, 0) = 87

Sometimes, the full message occurs, when launching statistics binary file:

WARNING during statistics_collector execution: : statistics_collector: Unable to parse pending domains traffic line: localhost.localdomain 2014-5-7 smtp 5586
System error 11: Resource temporarily unavailable
Executing logs preparation...

Cause

Syntax error in /usr/local/psa/var/log/mail_traffic_pendings.dat .

Resolution

Add " :: " symbols by executing the followinf command:

# sed -i '/::/!s/^/::/g' /usr/local/psa/var/log/mail_traffic_pendings.dat

E.g., the following lines

::example1.com 2014-2-16       smtp    1950
::example2.com 2014-2-16 smtp 1950
example3.com 2014-2-16 smtp 1950

will be changed to the following ones:

::example1.com 2014-2-16       smtp    1950
::example2.com 2014-2-16 smtp 1950
::example3.com 2014-2-16 smtp 1950
Have more questions? Submit a request
Please sign in to leave a comment.