Error during archiving

Hi there,

I have a Piwik install that has a high number of sites (20243 and growing), however a large number of these sites receive very little traffic.
I am running the archive.php script via the command line and I get an error at the end of the script run where it is completing the scheduled tasks

This is the error I get:

Error: Got invalid response from API request: http://domain-hidden.net/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=93def8fedbf824affe5692db7f43c653&trigger=archivephp. Response was '

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 71 bytes) in /home/stats/public_html/libs/Zend/Db/Statement/Pdo.php</b
1 total errors during this script execution, please investigate and try and fix these errors
ERROR: 1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://domain-hidden.net/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=93def8fedbf824affe5692db7f43c653&trigger=archivephp. Response was '

Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 71 bytes) in /home/stats/public_html/libs/Zend/Db/Statement/Pdo.php

By running the same URL in the browser (after an initial error) the script completes successfully

Presently the archiving takes 14-15 hours. I have run through the forum but have only found cases of high traffic with a small number of sites, not the situation I have.

Any help in speeding up the process and getting rid of this error would be appreciated

Thanks,

Seth Wilson

Allowed memory size of 805306368 bytes exhausted

It is a PHP memory issue