Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiving does not work - even if PHP limit is set to 1GB #14484

Closed
seyfro opened this issue May 25, 2019 · 4 comments
Closed

Archiving does not work - even if PHP limit is set to 1GB #14484

seyfro opened this issue May 25, 2019 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@seyfro
Copy link

seyfro commented May 25, 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
Copy link
Member

tsteur commented May 25, 2019

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.

@seyfro
Copy link
Author

seyfro commented May 25, 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.

@seyfro seyfro closed this as completed May 25, 2019
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label May 28, 2019
@7starsone
Copy link

Hello, I have an issue when archiving given by DataTable/Row.php on line 361
It can't archive a site even with 1GB php memory limit.
So, please, how to prevent? I'm using that limit on PHP-fpm, so I can't change it on runtime.
Thanks

@7starsone
Copy link

Hello, I have an issue when archiving given by DataTable/Row.php on line 361 It can't archive a site even with 1GB php memory limit. So, please, how to prevent? I'm using that limit on PHP-fpm, so I can't change it on runtime. Thanks

Sorry, I forgot that the cronjob doesn't run on php-fpm, so, nevermind... is enough to change the value on php.ini
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants