Fatal error: Allowed memory size of 134217728 bytes exhausted

I searched this issue and found this post:


I followed the instructions to set a cron job here:


And added all of the code it suggested:

/usr/local/bin/php -f /home/aadrives/public_html/piwik/misc/cron/archive.php – url=http://example.org/piwik/ > /home/example/piwik-archive-output.log

And received this via email at the top of the hour:

/bin/sh: /home/example/piwik-archive-output.log: No such file or directory

What am I missing? I am getting between 600 to 800 visitors per day and am trying to look at the previous months, years and getting the error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /home/aadrives/public_html/piwik/core/DataTable.php on line 1099

Please help!!

Thank you!


Maybe you need to create the file first and make it writable so the cron user can write the archive.php logs to it

memory error:
see How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo

Thank you! Ill give that a shot.

is the paths correct for all?

I changed the one that said “yoursiteurl” but did not change the example.org or example. Should these be changed?

/usr/local/bin/php -f /home/aadrives/public_html/piwik/misc/cron/archive.php – url=http://example.org/piwik/ > /home/example/piwik-archive-output.log

Hi again Matt…

Still not working. The instructions on how to do this are very diffcult to understand.

Is this how the code should read? And what files, if any do I need to create and upload?

/usr/local/bin/php -f /home/aadrives/public_html/piwik/misc/cron/archive.php – url=http:// allaboutdriveways.com/piwik/ > /home/aadrives/piwik-archive-output.log

I greatly appreciate your help.

Looks ok, what’s the error this time?

Got it fixed. This was already set up prior but the memory limit set on my server was was not high enough. Called my hosting company and they increased the memory. Sorry to have wasted your time :frowning: