I have the following set up as a cron job as per Matomo documentation.
php xxx.xxx.ca/console core:archive --url=https://traffic.umintmed.ca/ > matomo_archive_log
For the last few days I intermittently get errors from this.
Sometimes the errors are just a single
sh: fork: retry: Resource temporarily unavailable
and sometimes there are two.
What do I do to fix this?
At least once there was a lot more info:
ERROR [2020-10-07 00:05:09] 17403 Error unserializing the following response from ?module=API&method=API.get&idSite=1&period=month&date=last2&format=php&trigger=archivephp: sh: fork: retry: Resource temporarily unavailable a:2:{s:7:"2020-09";a:64:{s:16:"nb_uniq_visitors";d:81;s:9:"nb_visits";d:82;s:8:"nb_users";i:0;s:10:"nb_actions";d:105;s:11:"max_actions";d:6;s:12:"bounce_count";d:71;s:16:"sum_visit_length";d:3002;s:13:"nb_visits_new";d:78;s:14:"nb_actions_new";d:98;s:20:"nb_uniq_visitors_new";d:78;s:12:"nb_users_new";i:0;s:15:"max_actions_new";d:6;s:15:"bounce_rate_new";s:3:"87%";s:24:"nb_actions_per_visit_new";d:1.3;s:20:"avg_time_on_site_new";d:33;s:19:"nb_visits_returning";d:4;s:20:"nb_actions_returning";d:7;s:26:"nb_uniq_visitors_returning";d:4;s:18:"nb_users_returning";i:0;s:21:"max_actions_returning";d:4;s:21:"bounce_rate_returning";s:3:"75%";s:30:"nb_actions_per_visit_returning";d:1.8;s:26:"avg_time_on_site_returning";d:116;s:35:"Referrers_visitorsFromSearchEngines";i:60;s
:36:"Referrers_visitorsFromSocialNetworks";i:0;s:33:"Referrers_visitorsFromDirectEntry";i:4;s:30:"Referrers_visitorsFromWebsites";i:18;s:31:"Referrers_visitorsFromCampaigns";i:0;s:31:"Referrers_distinctSearchEngines";d:2;s:32:"Referrers_distinctSocialNetworks";i:0;s:26:"Referrers_distinctKeywords";d:2;s:26:"Referrers_distinctWebsites";d:3;s:30:"Referrers_distinctWebsitesUrls";d:11;s:27:"Referrers_distinctCampaigns";i:0;s:41:"Referrers_visitorsFromDirectEntry_percent";s:2:"4%";s:43:"Referrers_visitorsFromSearchEngines_percent";s:3:"56%";s:39:"Referrers_visitorsFromCampaigns_percent";s:2:"0%";s:44:"Referrers_visitorsFromSocialNetworks_percent";s:2:"0%";s:38:"Referrers_visitorsFromWebsites_percent";s:3:"17%";s:14:"nb_conversions";i:0;s:19:"nb_visits_converted";i:0;s:7:"revenue";i:0;s:15:"conversion_rate";s:2:"0%";s:24:"nb_conversions_new_visit";i:0;s:29:"nb_visits_converted_new_visit";i:0;s:17:"revenue_new_visit";i:0;s:25:"conversion_rate_new_visit";s:2:"0%";s:30:"nb_conversions_return
ing_visit";i:0;s:35:"nb_visits_converted_returning_visit";i:0;s:23:"revenue_returning_visit";i:0;s:31:"conversion_rate_returning_visit";s:2:"0%";s:12:"nb_pageviews";d:104;s:17:"nb_uniq_pageviews";d:101;s:12:"nb_downloads";i:0;s:17:"nb_uniq_downloads";i:0;s:11:"nb_outlinks";i:0;s:16:"nb_uniq_outlinks";i:0;s:11:"nb_searches";d:1;s:11:"nb_keywords";d:1;s:28:"nb_hits_with_time_generation";d:97;s:19:"avg_time_generation";d:0.912;s:11:"bounce_rate";s:3:"87%";s:20:"nb_actions_per_visit";d:1.3;s:16:"avg_time_on_site";d:37;}s:7:"2020-10";a:64:{s:16:"nb_uniq_visitors";d:26;s:9:"nb_visits";d:26;s:8:"nb_users";i:0;s:10:"nb_actions";d:31;s:11:"max_actions";d:3;s:12:"bounce_count";d:22;s:16:"sum_visit_length";d:222;s:13:"nb_visits_new";d:25;s:14:"nb_actions_new";d:28;s:20:"nb_uniq_visitors_new";d:25;s:12:"nb_users_new";i:0;s:15:"max_actions_new";d:2;s:15:"bounce_rate_new";s:3:"88%";s:24:"nb_actions_per_visit_new";d:1.1;s:20:"avg_time_on_site_new";d:4;s:19:"nb_visits_returning";d:1;s:20:"nb_action
s_returning";d:3;s:26:"nb_uniq_visitors_returning";d:1;s:18:"nb_users_returning";i:0;s:21:"max_actions_returning";d:3;s:21:"bounce_rate_returning";s:2:"0%";s:30:"nb_actions_per_visit_returning";d:3;s:26:"avg_time_on_site_returning";d:133;s:35:"Referrers_visitorsFromSearchEngines";i:12;s:36:"Referrers_visitorsFromSocialNetworks";i:0;s:33:"Referrers_visitorsFromDirectEntry";i:12;s:30:"Referrers_visitorsFromWebsites";i:2;s:31:"Referrers_visitorsFromCampaigns";i:0;s:31:"Referrers_distinctSearchEngines";d:2;s:32:"Referrers_distinctSocialNetworks";i:0;s:26:"Referrers_distinctKeywords";d:1;s:26:"Referrers_distinctWebsites";d:1;s:30:"Referrers_distinctWebsitesUrls";d:2;s:27:"Referrers_distinctCampaigns";i:0;s:41:"Referrers_visitorsFromDirectEntry_percent";s:3:"11%";s:43:"Referrers_visitorsFromSearchEngines_percent";s:3:"11%";s:39:"Referrers_visitorsFromCampaigns_percent";s:2:"0%";s:44:"Referrers_visitorsFromSocialNetworks_percent";s:2:"0%";s:38:"Referrers_visitorsFromWebsites_percent";s:2:"
2%";s:14:"nb_conversions";i:0;s:19:"nb_visits_converted";i:0;s:7:"revenue";i:0;s:15:"conversion_rate";s:2:"0%";s:24:"nb_conversions_new_visit";i:0;s:29:"nb_visits_converted_new_visit";i:0;s:17:"revenue_new_visit";i:0;s:25:"conversion_rate_new_visit";s:2:"0%";s:30:"nb_conversions_returning_visit";i:0;s:35:"nb_visits_converted_returning_visit";i:0;s:23:"revenue_returning_visit";i:0;s:31:"conversion_rate_returning_visit";s:2:"0%";s:12:"nb_pageviews";d:31;s:17:"nb_uniq_pageviews";d:30;s:12:"nb_downloads";i:0;s:17:"nb_uniq_downloads";i:0;s:11:"nb_outlinks";i:0;s:16:"nb_uniq_outlinks";i:0;s:11:"nb_searches";i:0;s:11:"nb_keywords";i:0;s:28:"nb_hits_with_time_generation";d:30;s:19:"avg_time_generation";d:1.08;s:11:"bounce_rate";s:3:"85%";s:20:"nb_actions_per_visit";d:1.2;s:16:"avg_time_on_site";d:9;}}
ERROR [2020-10-07 00:05:30] 17403 Got invalid response from API request: ?module=API&method=API.get&idSite=4&period=month&date=last2&format=php&trigger=archivephp. The response was empty. This usually means a server error. A solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. For more information and the error message please check in your PHP CLI error log file. As this core:archive command triggers PHP processes over the CLI, you can find where PHP CLI logs are stored by running this command: php -i | grep error_log ERROR [2020-10-07 00:05:36] 17403 2 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2020-10-07 00:05:36] 17403 Uncaught exception: /home/xxx/xxx.xxx.ca/core/CronArchive.php(606): 2 total errors during this script execution, please investigate and try and fix these errors.
2 total errors during this script execution, please investigate and try and fix these errors.
#0 /home/xxx/xxx.xxx.ca/core/CronArchive.php(599): Piwik\CronArchive->logFatalError('2 total errors ...')
#1 /home/xxx/xxx.xxx.ca/core/CronArchive.php(331): Piwik\CronArchive->end()
#2 /home/xxx/xxx.xxx.ca/core/Access.php(635): Piwik\CronArchive->Piwik\{closure}()
#3 /home/xxx/xxx.xxx.ca/core/CronArchive.php(335): Piwik\Access::doAsSuperUser(Object(Closure))
#4 /home/xxx/xxx.xxx.ca/plugins/CoreConsole/Commands/CoreArchiver.php(27): Piwik\CronArchive->main()
#5 /home/xxx/xxx.xxx.ca/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Piwik\Plugins\CoreConsole\Commands\CoreArchiver->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /home/xxx/xxx.xxx.ca/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/xxx/xxx.xxx.ca/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Piwik\Plugins\CoreConsole\Commands\CoreArchiver), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 [internal function]: Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/xxx/xxx.xxx.ca/core/Console.php(140): call_user_func(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/xxx/xxx.xxx.ca/core/Access.php(644): Piwik\Console->Piwik\{closure}()
#11 /home/xxx/xxx.xxx.ca/core/Console.php(141): Piwik\Access::doAsSuperUser(Object(Closure))
#12 /home/xxx/xxx.xxx.ca/core/Console.php(93): Piwik\Console->doRunImpl(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /home/xxx/xxx.xxx.ca/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Piwik\Console->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /home/xxx/xxx.xxx.ca/console(32): Symfony\Component\Console\Application->run()
#15 {main}
[Exception]
2 total errors during this script execution, please investigate and try and fix these errors.
core:archive [--url="..."] [--force-all-websites] [--force-all-periods[="..."]] [--force-timeout-for-periods[="..."]] [--skip-idsites[="..."]] [--skip-all-segments] [--force-idsites[="..."]] [--skip-segments-today] [--force-periods[="..."]] [--force-date-last-n="..."] [--force-date-range[="..."]] [--force-idsegments="..."] [--concurrent-requests-per-website[="..."]] [--concurrent-archivers[="..."]] [--disable-scheduled-tasks] [--accept-invalid-ssl-certificate] [--php-cli-options[="..."]]
1 post - 1 participant