We have exactly the same behavior. Monthly and Yearly reports can’t be finished.
I import logfiles via scheduled task (import_logs.py) and a scheduled task to archive the entries via archive.php.
Piwik 1.12
PHP version: [PHP: 5.4.19]
Windows Server
Server Memory: 4GB
I increased all known memory settings without success.
e.g. in global.ini.php
minimum_memory_limit_when_archiving = 3072
and in /php/php.ini
memory_limit = -1
Can you help me?
During archiving first I get this:
[2014-02-24 04:56:32] [fc142406] ERROR: Got invalid response from API request: http://...../piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last12&format=php&token_auth=123456789&trigger=archivephp. Response was '<br /> <b>Fatal error</b>: Out of memory (allocated 1809580032) (tried to allocate 4104 bytes) in <b>....\htdocs\piwik\core\DataTable.php</b> on line <b>1050</b><br /> '
and in the Summary:
[2014-02-24 05:08:14] [fc142406] SUMMARY OF ERRORS
[2014-02-24 05:08:14] [fc142406] Error: Got invalid response from API request: http://...../piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last12&format=php&token_auth=123456789&trigger=archivephp. Response was '<br /> <b>Fatal error</b>: Out of memory (allocated 1809580032) (tried to allocate 4104 bytes) in <b>...\htdocs\piwik\core\DataTable.php</b> on line <b>
[2014-02-24 05:08:14] [fc142406] Error: Got invalid response from API request: http://...../piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=year&date=last12&format=php&token_auth=123456789&trigger=archivephp. Response was '<br /> <b>Fatal error</b>: Out of memory (allocated 1809317888) (tried to allocate 4104 bytes) in <b>...\htdocs\piwik\core\DataTable.php</b> on line <b>1
[2014-02-24 05:08:14] [fc142406] 2 total errors during this script execution, please investigate and try and fix these errors
[2014-02-24 05:08:14] [fc142406] ERROR: 2 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://...../piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last12&format=php&token_auth=123456789&trigger=archivephp. Response was '<br /> <b>Fatal error</b>: Out of memory (allocated 1809580032) (tried to allocate 4104 bytes) in <b>...\htdocs\piwik\core\DataTable.php</b> on line <b>
Fatal error: 2 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://...../piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last12&format=php&token_auth=123456789&trigger=archivephp. Response was '<br />
<b>Fatal error</b>: Out of memory (allocated 1809580032) (tried to allocate 4104 bytes) in <b>...\htdocs\piwik\core\DataTable.php</b> on line <b> in ...\htdocs\piwik\misc\cron\archive.php on line 573
I’ll have to wait until 2.1 is released. My organization’s policy is that we will only install stable versions. In the meantime I had to move analytics back to the existing server.