Symptoms
-
The web-statistics calculation does not work: The values at Tools & Settings > Traffic Usage by Domains (under Statistics) are not updated.
-
When manually recalculating the statistics for a domain, the operation fails with the following error message:
# /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=example.com
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 62390354 bytes) in /usr/local/psa/admin/plib/Service/Agent/Transport/Local/Exec.php on line 240
Cause
PHP memory limit is exceeded.
Resolution
-
Connect to the Plesk server via SSH.
-
Increase
memory_limit
in PHP configuration of Plesk:2.1. Open the file
/usr/local/psa/admin/conf/php.ini
in a text editor. In this example, we are using the vi editor:# vi /usr/local/psa/admin/conf/php.ini
2.2. Navigate to the line
memory_limit
and increase the value to 1024M.2.3. Save the changes and close the file.
-
Restart the
sw-cp-server
service to apply the changes:# service sw-cp-server restart
-
Recalculate statistics for all domains with the command:
# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteWebStatistics