I try to archive just the more visited site in small steps with:
console core:archive --url=https://matomo.neuland.technology --skip-idsites=2,3,4 --force-periods=day --force-date-range=2022-07-08,2022-07-14 --concurrent-requests-per-website=1
The errors I get in detail while running this command manually on the CLI:
ERROR [2022-08-17 18:34:58] 21563 Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-07-14&format=json&segment=provider%21%3DAMAZON-02&trigger=archivephp. Response was 'Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)'
INFO [2022-08-17 18:34:58] 21563 'Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)'
ERROR [2022-08-17 18:34:58] 21563 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-07-14&format=json&segment=provider%21%3DAMAZON-02&trigger=archivephp: 'Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)Matomo encountered an error: Allowed memory size of 17179869184 bytes exhausted (tried to allocate 4055908352 bytes) (which lead to: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.)'
ERROR [2022-08-17 18:43:12] 21563 Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-07-14&format=json&segment=pageUrl%21%40%25252Fapi%25252F&trigger=archivephp. Response was '{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233) #0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233)\n#0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport()\n\n#0 [internal function]: Piwik\\Plugins\\CorePluginsAdmin\\Controller->safemode(Array)\n#1 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#2 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(169): Piwik\\FrontController->doDispatch('CorePluginsAdmi...', 'safemode', Array)\n#3 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(100): Piwik\\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(275): Piwik\\FrontController::generateSafeModeOutputFromError(Array)\n#5 [internal function]: Piwik\\FrontController::triggerSafeModeWhenError()\n#6 {main}"}{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233) #0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233)\n#0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport()\n\n#0 [internal function]: Piwik\\Plugins\\CorePluginsAdmin\\Controller->safemode(Array)\n#1 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#2 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(169): Piwik\\FrontController->doDispatch('CorePluginsAdmi...', 'safemode', Array)\n#3 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(100): Piwik\\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(275): Piwik\\FrontController::generateSafeModeOutputFromError(Array)\n#5 [internal function]: Piwik\\FrontController::triggerSafeModeWhenError()\n#6 {main}"}'
INFO [2022-08-17 18:43:12] 21563 '{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/libs\\/Zend\\/Db\\/Statement\\/Pdo.php(233) #0 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/core\\/ArchiveProcessor\\/PluginsArchiver.php(164): Piwik\\\\Plugins\\\\Actions\\\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/libs\\/Zend\\/Db\\/Statement\\/Pdo.php(233)\\n#0 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/core\\/ArchiveProcessor\\/PluginsArchiver.php(164): Piwik\\\\Plugins\\\\Actions\\\\Archiver->callAggregateDayReport()\\n\\n#0 [internal function]: Piwik\\\\Plugins\\\\CorePluginsAdmin\\\\Controller->safemode(Array)\\n#1 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(631): call_user_func_array(Array, Array)\\n#2 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(169): Piwik\\\\FrontController->doDispatch(\'CorePluginsAdmi...\', \'safemode\', Array)\\n#3 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(100): Piwik\\\\FrontController->dispatch(\'CorePluginsAdmi...\', \'safemode\', Array)\\n#4 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(275): Piwik\\\\FrontController::generateSafeModeOutputFromError(Array)\\n#5 [internal function]: Piwik\\\\FrontController::triggerSafeModeWhenError()\\n#6 {main}"}{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/libs\\/Zend\\/Db\\/Statement\\/Pdo.php(233) #0 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/core\\/ArchiveProcessor\\/PluginsArchiver.php(164): Piwik\\\\Plugins\\\\Actions\\\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/libs\\/Zend\\/Db\\/Statement\\/Pdo.php(233)\\n#0 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/matomo\\/core\\/ArchiveProcessor\\/PluginsArchiver.php(164): Piwik\\\\Plugins\\\\Actions\\\\Archiver->callAggregateDayReport()\\n\\n#0 [internal function]: Piwik\\\\Plugins\\\\CorePluginsAdmin\\\\Controller->safemode(Array)\\n#1 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(631): call_user_func_array(Array, Array)\\n#2 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(169): Piwik\\\\FrontController->doDispatch(\'CorePluginsAdmi...\', \'safemode\', Array)\\n#3 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(100): Piwik\\\\FrontController->dispatch(\'CorePluginsAdmi...\', \'safemode\', Array)\\n#4 \\/var\\/www\\/web1\\/htdocs\\/xxx\\/dbuser\\/core\\/FrontController.php(275): Piwik\\\\FrontController::generateSafeModeOutputFromError(Array)\\n#5 [internal function]: Piwik\\\\FrontController::triggerSafeModeWhenError()\\n#6 {main}"}'
ERROR [2022-08-17 18:43:12] 21563 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-07-14&format=json&segment=pageUrl%21%40%25252Fapi%25252F&trigger=archivephp: '{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233) #0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233)\n#0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport()\n\n#0 [internal function]: Piwik\\Plugins\\CorePluginsAdmin\\Controller->safemode(Array)\n#1 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#2 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(169): Piwik\\FrontController->doDispatch('CorePluginsAdmi...', 'safemode', Array)\n#3 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(100): Piwik\\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(275): Piwik\\FrontController::generateSafeModeOutputFromError(Array)\n#5 [internal function]: Piwik\\FrontController::triggerSafeModeWhenError()\n#6 {main}"}{"result":"error","message":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233) #0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport() ","backtrace":"Allowed memory size of 17179869184 bytes exhausted (tried to allocate 28338792960 bytes) on \/var\/www\/web1\/htdocs\/xxx\/matomo\/libs\/Zend\/Db\/Statement\/Pdo.php(233)\n#0 \/var\/www\/web1\/htdocs\/xxx\/matomo\/core\/ArchiveProcessor\/PluginsArchiver.php(164): Piwik\\Plugins\\Actions\\Archiver->callAggregateDayReport()\n\n#0 [internal function]: Piwik\\Plugins\\CorePluginsAdmin\\Controller->safemode(Array)\n#1 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(631): call_user_func_array(Array, Array)\n#2 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(169): Piwik\\FrontController->doDispatch('CorePluginsAdmi...', 'safemode', Array)\n#3 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(100): Piwik\\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)\n#4 \/var\/www\/web1\/htdocs\/xxx\/dbuser\/core\/FrontController.php(275): Piwik\\FrontController::generateSafeModeOutputFromError(Array)\n#5 [internal function]: Piwik\\FrontController::triggerSafeModeWhenError()\n#6 {main}"}'