Confusing errors in CronArchive.php

Hey there

Matomo recently started to send me cron mails like this:

Subject: Cron <www-data@redacted> /usr/bin/php /redacted/console core:archive --url=https://piwik.redacted/ > /redacted/logs/piwik-archive.log
In CronArchive.php line 648:
                                                                              
  16 total errors during this script execution, please investigate and try an 
  d fix these errors.                                                         
                                                                              

core:archive [--url URL] [--skip-idsites [SKIP-IDSITES]] [--skip-all-segments] [--force-idsites [FORCE-IDSITES]] [--skip-segments-today] [--force-periods [FORCE-PERIODS]] [--force-date-last-n [FORCE-DATE-LAST-N]] [--force-date-range [FORCE-DATE-RANGE]] [--force-idsegments FORCE-IDSEGMENTS] [--concurrent-requests-per-website [CONCURRENT-REQUESTS-PER-WEBSITE]] [--concurrent-archivers [CONCURRENT-ARCHIVERS]] [--max-websites-to-process MAX-WEBSITES-TO-PROCESS] [--max-archives-to-process MAX-ARCHIVES-TO-PROCESS] [--disable-scheduled-tasks] [--accept-invalid-ssl-certificate] [--php-cli-options [PHP-CLI-OPTIONS]] [--force-all-websites] [--force-report [FORCE-REPORT]]

but when I look in /redacted/logs/piwik-archive.log, there are no errors. Only INFO messages. There’s even a line saying “no errors occured”

Any ideas what could be wrong?

Thanks in advance!

Kind regards
Dennis

Same problem here.

Executing the command from the console like:

sudo -u www-data /usr/bin/php /var/www/matomo/console core:archive --url=https://example.com/

doesn’t show any error.

Same for me. I have two Google Cloud servers (running cron as www-data), one with no problem, the other with this.

Same for me.
Archive is set to 3600 sec, but error does not occur every hour. Erratic. Unfortunately, error gives code, that causes an error, but not the error itself (such as “memory full” or similar).

Hi,
we experienced a similar problems in our instance after upgrading to 5.2. Since then the following errors appear in the log:

ERROR     [2024-12-17 23:41:08] 12930  Uncaught exception: /local/ www/ html/piwik/core/CronArchive.php(648): 1 total errors during this script execution, please investigate and try and fix th
ese errors. [Query: , CLI mode: 1]

Mysqli statement execute error : Deadlock found when trying to get lock; try restarting transaction - in plugin VisitFrequency.

Best regards
Michal