Open DaAwesomeP opened 3 years ago
Just a minor comment that might explain this: The error doesn't occur during archiving, but rather during running of the scheduled tasks after the archiving, so maybe that memory limit doesn't apply there.
Ah, that would make sense. Seems reasonable to apply it there too since the downlaod is that big? Or is this some other compounding issue? Would that be a pull to this repo or the main Matomo repo?
Is there a quick fix or workaround I could implement in my install? This is causing a cron error every little while (when it updates the geo database).
The apache container doesn't appear to have a php.ini file for the cli:
# find / -name \*.ini
/usr/local/etc/php/conf.d/php-matomo.ini
/usr/local/etc/php/conf.d/opcache-recommended.ini
/usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini
/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
/usr/local/etc/php/conf.d/docker-php-ext-redis.ini
/usr/local/etc/php/conf.d/docker-php-ext-mysqli.ini
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
root@92985cc5978e:/#
You could try setting it explicitly on the command line:
MAILTO="youremail@example.com"
5 * * * * www-data /usr/local/bin/php -d memory_limit=768M /var/www/html/console core:archive --url=http://example.org/matomo/ > /home/example/matomo-archive.log
See here for more info: https://matomo.org/docs/setup-auto-archiving/#linux-unix-how-to-set-up-a-crontab-to-automatically-archive-the-reports
Sorry for the late response, but that definitely did the trick! May I recommend this be added to the documentation somewhere? I originally saw that page but was confused because of the issue you mentioned (no php.ini
file for the CLI). Or, maybe a php.ini
could be added to the container.
When archiving:
So it's limiting it to 128 MiB, but that doesn't make sense to me since in
config/global.ini.php
we have:I do not have anything related to memory in
config/config.ini.php
. So it should be limiting it to 768 MiB in this scenario, right?My cron command: