Core:Archive error


There are no errors in the archive log file but the cronjob emailed this error:

"ERROR CoreConsole[2014-07-14 03:29:36] [a700c] Got invalid response from API request: Response was 'PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 64 bytes) in /var/www/core/DataTable/Row.php on line 76 '
ERROR CoreConsole[2014-07-14 03:29:36] [a700c] 1 total errors during this script execution, please investigate and try and fix these errors."

The archive log file is currently here:

"INFO CoreConsole[2014-07-14 09:43:08] [f04fb] Archived website id = 19, 4 API requests, Time elapsed: 492.606s [15/17 done]
INFO CoreConsole[2014-07-14 09:43:12] [f04fb] Archived website id = 20, period = day, 4 visits in last last2 days, 2 visits today, Time elapsed: 3.641s
INFO CoreConsole[2014-07-14 09:43:30] [f04fb] Archived website id = 20, period = week, 72 visits in last last2 weeks, 2 visits this week, Time elapsed: 18.274s
INFO CoreConsole[2014-07-14 09:45:28] [f04fb] Archived website id = 20, period = month, 487 visits in last last2 months, 121 visits this month, Time elapsed: 117.709s"


Allowed memory size of 1073741824 bytes exhausted (tried to allocate 64 bytes)

seems to be the problem…


/cli/php.ini & /apache2/php.ini are set as 3072M limit yet it seems to be ignored?

; Maximum amount of memory a script may consume (128MB)
; PHP: Description of core php.ini directives - Manual
memory_limit = 3072M

Does it need to be set anywhere else?


try to execute a php file with phpinfo(); the same way you execute the script that gives the error.
It should show you what ini file is being used and it shuold show you the limits that are set.



Something is seriously wrong with this.

Since the upgrade to 2.4.0 our archive_blob tables have used up 40GB disk space in a week!


Are you running windows? I have finally got this working on our servers. Seems Piwik “swallows” PHP and OS errors and displays its error message assuming the error is coming out of the Piwik code. In my case the archive function was not displaying the fact the cURL was not correctly configured for SSL. It also hid that there was an issue with write access to the tmp folder used during the archiving process. Matt suggested the “-v” switch on the scripts (verbose mode) which then showed us all the errors we needed to correct to get things working correctly.

(Matthieu Aubry) #7

@jeb1217 I believe this issue of Piwik not reporting the proper error message was fixed in a recent pull request: provide a more useful error message on exception by craue · Pull Request #345 · matomo-org/matomo · GitHub