I’m running WordPress wthin a lamp-modul (Version 1.0.13 )
My Mataomo Plugin reports Matomo Cron Error with
84 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:473; CronArchive.php:468; CronArchive.php:226; Access.php:567; CronArchive.php:221; ScheduledTasks.php:383; class-wp-hook.php:322; class-wp-hook.php:348; plugin.php:565; wp-cron.php:191;
Warning archive_errors: 2025-01-22 13:28:08 ('Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-22&format=json&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.
Last Successful Archiving Completion error Archiving last ran successfully on Monday, January 13, 2025 12:29:37 which is 9 days 01:10:46 ago
I honestly have no explanation for it, since everything worked for months before that.
Was there an update with changes about 9 days ago that could have caused this malfunction?
log
Matomo
Matomo Plugin Version: 5.2.0
Config exists and is writable.: Yes (“$abs_path/wp-content/uploads/matomo/config/config.ini.php” )
JS Tracker exists and is writable.: Yes (“$abs_path/wp-content/uploads/matomo/matomo.js” )
Archive: Next run: 2025-01-22 15:25:09 (44 min 45s) ( Last started: 2025-01-22 14:25:10 (-15 min 14s). Last ended: 2025-01-22 14:25:58 (-14 min 26s). Interval: hourly)
Update GeoIP DB: Next run: 2025-02-20 13:25:54 (28 days 22 hours) ( Last started: 2025-01-21 13:27:31 (-1 days 1 hours). Last ended: 2025-01-21 13:27:33 (-1 days 1 hours). Interval: matomo_monthly)
Mandatory checks
PHP version >= 7.2.5: ok
PDO extension: ok
PDO\MYSQL extension: ok
MYSQLI extension: ok
Other required extensions: ok
Required functions: ok
Required PHP configuration (php.ini): ok
Directories with write access: ok
Directories with write access for Tag Manager: ok
Optional checks
64-bit PHP Binary: ok
Tracker status: ok
Memory limit: ok
Time zone: ok
Open URL: ok
GD > 2.x + FreeType (graphics): ok
Other extensions: ok
Other functions: ok
Filesystem: ok
Error Last Successful Archiving Completion: error (Archiving last ran successfully on Monday, January 13, 2025 12:29:37 which is 9 days 01:10:46 ago )
Database abilities: ok
Warning Max Packet Size: warning (It is recommended to configure a ‘max_allowed_packet’ size in your MySQL database of at least 64MB. Configured is currently 16MB. )
Version history: 5.2.0, 5.1.7, 5.1.6, 5.1.5, 5.1.4
Core version: 5.2.1
Last tracking settings update: 1737552684
Last settings update: 1737552684
Track content: all
Track ecommerce: No
Track search: Yes
Track 404: Yes
Track across: Yes
Track across alias: Yes
Track user id: username
Mail history: 2025-01-01 00:30:12, 2025-01-01 00:30:07, 2024-12-01 00:25:34
Logs
Warning archive_main: 2025-01-22 13:28:08 (84 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:473; CronArchive.php:468; CronArchive.php:226; Access.php:567; CronArchive.php:221; ScheduledTasks.php:383; class-wp-hook.php:322; class-wp-hook.php:348; plugin.php:565; wp-cron.php:191;)
Warning archive_errors: 2025-01-22 13:28:08 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-22&format=json&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 unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-22&format=json&trigger=archivephp: ''’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-21&format=json&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 unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-21&format=json&trigger=archivephp: ''’ 'Got invalid response from API request: ?
… and so on
<…snip…>
Server Info: Apache/2.4.58 (Ubuntu)
Apache AddHandler support: Supported
PHP OS: Linux
PHP Version: 8.3.15
PHP SAPI: apache2handler
PHP Maxmind DB extension: Not loaded
PHP Error Reporting: 4437 After bootstrap: 4437
PHP Found Binary: /usr/bin/php -q
Timezone: UTC
WP timezone: Europe/Berlin
Locale: de_DE
User Locale: en_US
Memory Limit: 512M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
WP Memory Limit: 40M
WP Max Memory Limit: 512M
Timezone version: 0.system
Time: 1737553958
Max Execution Time: 600
Max Post Size: 100M
Max Upload Size: 104857600
Max Input Vars: 1000
Disabled PHP functions: No
zlib.output_compression is off: Yes
Curl Version: 8.5.0, OpenSSL/3.0.13
Suhosin installed: No
PHP cli
PHP CLI Version: 8.3.15
MySQLi support: ok
PHP CLI configuration: Configured correctly
Database
MySQL Version: 10.11.8
Mysqli Connect: Yes
Force MySQL over Mysqli: No
DB Prefix: wphh_
DB CHARSET: utf8mb4
DB COLLATE:
SHOW ERRORS: No
SUPPRESS ERRORS: No
Uses Socket: No
Uses IPv6: No
Matomo tables found: 151
DB tables exist: Yes
Matomo users found: 4
Matomo sites found: 1
Required permissions: OK
Browser
Browser: (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0)
I found alot of entires within my Ninja Firewall log.
22/Jan/25 13:05:50 #7287880 MEDIUM - 193.26.159.118 POST /wp-admin/admin-ajax.php - Blocked access to admin-ajax.php - [bot detection is enabled] - www.hegering-hattingen.de
That means, the FW recognize attacks from my own server.
I don’t understand this, because I use the same configuration on other Werdpress servers, without problems.
84 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:473; CronArchive.php:468; CronArchive.php:226; Access.php:567; CronArchive.php:221; ScheduledTasks.php:383; class-wp-hook.php:322; class-wp-hook.php:348; plugin.php:565; wp-cron.php:191;
‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-22&format=json&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 unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-22&format=json&trigger=archivephp: ''’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-21&format=json&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 unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-21&format=json&trigger=archivephp: ''’ 'Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-20&format=json&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.
Now, archiving reports works again when cron is not used.
If I disable the option again, the error occurs again.
Matomo Cron Error: An error occurred during Matomo archiving. See error details in the Diagnostics page.
in detail:
Matomo Archive Warnings: 'Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-23&format=json&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.
'Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2025-01-23&format=json&trigger=archivephp: \'\''
'Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2025-01-20&format=json&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.
root@lamp:/# tree /etc/cron*
/etc/cron.d
|-- e2scrub_all
`-- php
/etc/cron.daily
|-- apache2
|-- apt-compat
`-- dpkg
/etc/cron.hourly
/etc/cron.monthly
/etc/cron.weekly
/etc/cron.yearly
/etc/crontab [error opening dir]
2 directories, 6 files
root@lamp:/# cat /etc/cron.d
cron.d/ cron.daily/
root@lamp:/# cat /etc/cron.d/php
# /etc/cron.d/php@PHP_VERSION@: crontab fragment for PHP
# This purges session files in session.save_path older than X,
# where X is defined in seconds as the largest value of
# session.gc_maxlifetime from all your SAPI php.ini files
# or 24 minutes if not defined. The script triggers only
# when session.save_handler=files.
#
# WARNING: The scripts tries hard to honour all relevant
# session PHP options, but if you do something unusual
# you have to disable this script and take care of your
# sessions yourself.
# Look for and purge old sessions every 30 minutes
09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi
root@lamp:/# cat /etc/cron.daily/ap
apache2 apt-compat
root@lamp:/# cat /etc/cron.daily/apache2
#!/bin/sh
# run htcacheclean if set to 'cron' mode
set -e
set -u
type htcacheclean > /dev/null 2>&1 || exit 0
[ -e /etc/default/apache-htcacheclean ] || exit 0
# edit /etc/default/apache-htcacheclean to change this
HTCACHECLEAN_MODE=daemon
HTCACHECLEAN_RUN=auto
HTCACHECLEAN_SIZE=300M
HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk
HTCACHECLEAN_OPTIONS=""
. /etc/default/apache-htcacheclean
[ "$HTCACHECLEAN_MODE" = "cron" ] || exit 0
htcacheclean ${HTCACHECLEAN_OPTIONS} \
-p${HTCACHECLEAN_PATH} \
-l${HTCACHECLEAN_SIZE}
root@lamp:/# crontab -l
no crontab for root