Archive task is not running after migration to a new server

We migrated a matomo 5.4 server from Windows 2012 box to a W2022 box.

The process was to backup and restore the MariaDB database, and copy the matomo folder.

The diagnostics page was indicating that the archive process needed to be run and when we tried we received several errors like this:

“ERROR [2025-10-15 08:54:27] 8792 Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=day&date=2025-09-11&format=json&plugin=Actions&trigger=archivephp&pluginOnly=1&requestedReport=Actions_hits: ‘Got invalid response from API request: hostname/matomo/?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=day&date=2025-09-11&format=json&plugin=Actions&trigger=archivephp&pluginOnly=1&requestedReport=Actions_hits&. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.’

ERROR [2025-10-15 10:22:33] 9092 218 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2025-10-15 10:22:33] 9092 Uncaught exception: \core\CronArchive.php(741): 218 total errors during this script execution, please investigate and try and fix these errors. [Query: , CLI mode: 1]

In CronArchive.php line 741:

218 total errors during this script execution, please investigate and try and fix these errors.

After that we tried to use fresh matomo install files and restore the database.

We tried also to update to matomo 5.5 to see if it was possible to fix the errors, but the issue is not solved.

The web server log only shows hits with web code 204.

Just to add that memory_limit is set to 4G in php.ini

Regards

Hi, you have prob. seen these post. Maybe they help. It may not be the root cause as Stefan is saying but may help not getting the error. If the data is corrupt somehow, this will not fix the root cause, but maybe it suppress the error. I think Matomo should be more resilience to this, even do the source of the error/corrupt data is somewhere else.

I do have the same error and getting emails warnings from the cron job, running Matomo 5.4 with MariaDB 10.5.28 (if I am not wrong). This started after upgrading to 5.4 from 5.2.2. Still investigating this. I also have a warning about “Allowed memory size of 805306368 bytes exhausted“ but that is not the case, I’ve increased the script memory limit for the cron job and also in the PHP.ini file, I tested with up to 8GB of memory for the script and php.ini but no difference.