@robertharm opened this Issue on May 25th 2019

We are running Matomo 3.9.1 and recently discovered that although auto-archiving via cron-job was configured, that this has not been triggered for several months.

Following your docs we tried to start archiving via php command line, unfortunately this even failed after assigning 1GB of RAM to php temporarily, with the following error(s):

INFO [2019-05-24 06:56:40] 20239 Error: Got invalid response from API request: ?module=API&method=API.get&idSite=14&period=year&date=last7&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:346:"Allowed memory size of 134217728 bytes exhausted (tried to allocate 1044480 bytes) on /piwik/core/DataTable.php(1344) #0 /piwik/core/ArchiveProcessor/PluginsArchiver.php(163): Piwik\Plugins\UserCountry\Archiver->callAggregateMultipleReports() ";}'

My hoster also informed me that the load during executing archiving was more than 30 (on a very powerful server). The sites tracked itself are not that huge, all sites together using this matomo instance track about 1000 unique visitors/day.

Are there any other memory settings (than memory_limit in php.ini) which need to be taken into consideration? Any other ideas on how to successfully trigger archiving would be much appreciated!

@tsteur commented on May 25th 2019 Member

This sounds more of a question for forum: https://forum.matomo.org
Maybe you have heaps of actions or different URLs? Or maybe you have adjusted some config settings to allow more rows per archive which then maybe requires more memory.

@robertharm commented on May 25th 2019

Thanks for the hint - I checked config.ini.php:

minimum_memory_limit_when_archiving = "128M"

I changed this to

minimum_memory_limit_when_archiving = "256M"

and archiving worked afterwards (as the general PHP limit on our server is 256M. I just wonder why archiving does not use 256M as the setting is called mimimum_memory_limit_archiving and not maximum_memory_limit_when_archiving

Anyway the issue is closed for me - I´d suggest though to have a look at this constant, as at least for me it does not work as it should.

This Issue was closed on May 25th 2019
Powered by GitHub Issue Mirror