A lot of cronjob errors and warnings

Hi there,

last week our matomo tracking is suddenly fallen dorn from 120 visitors a day to 3 visitors a day.
I checked the cronjob and get a bunch of errors and warnings.
To be honest: I feel lost:

su www-data -s /bin/bash -c “/usr/bin/php /var/customers/webs/mydomain/matomo/console core:archive --url=https://stats.mydomain.de/”

INFO [2021-05-07 11:46:07] 22411  ---------------------------
INFO [2021-05-07 11:46:07] 22411  INIT
INFO [2021-05-07 11:46:07] 22411  Running Matomo 4.2.1 as Super User
INFO [2021-05-07 11:46:07] 22411  ---------------------------
INFO [2021-05-07 11:46:07] 22411  NOTES
INFO [2021-05-07 11:46:07] 22411  - Async process archiving supported, using CliMulti.
INFO [2021-05-07 11:46:07] 22411  - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings.
INFO [2021-05-07 11:46:07] 22411  - Archiving was last executed without error 30 min 58s ago
WARNING [2021-05-07 11:46:07] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
WARNING [2021-05-07 11:46:07] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2021-05-07 11:46:07] 22411  ---------------------------
INFO [2021-05-07 11:46:07] 22411  START
INFO [2021-05-07 11:46:07] 22411  Starting Matomo reports archiving...
WARNING [2021-05-07 11:46:07] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
WARNING [2021-05-07 11:46:07] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2021-05-07 11:46:07] 22411  Start processing archives for site 1.
INFO [2021-05-07 11:46:07] 22411    Will invalidate archived reports for today in site ID = 1's timezone (2021-05-07 00:00:00).
INFO [2021-05-07 11:46:07] 22411    Will invalidate archived reports for yesterday in site ID = 1's timezone (2021-05-06 00:00:00).
WARNING [2021-05-07 11:46:07] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/99f47b683efe9c1dd072e6e553fd99337d39ada743a747b3164f4631945c66c694bf164a00ed08be13e3f153a59c7daf655a0.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
sh: 1: cannot create /var/customers/webs/mydomain/matomo/tmp/climulti/99f47b683efe9c1dd072e6e553fd99337d39ada743a747b3164f4631945c66c694bf164a00ed08be13e3f153a59c7daf655a0.output: Permission denied
ERROR [2021-05-07 11:46:07] 22411  Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2021-05-07&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
INFO [2021-05-07 11:46:07] 22411  false
ERROR [2021-05-07 11:46:07] 22411  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2021-05-07&format=json&trigger=archivephp: ''
WARNING [2021-05-07 11:46:08] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/7d8b22e686bb9f70773f4efa90f40ffbdaece299d26d4f31a1d3fa1c09058877ca2820bfc27f33619562b86037842c444f110.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
sh: 1: cannot create /var/customers/webs/mydomain/matomo/tmp/climulti/7d8b22e686bb9f70773f4efa90f40ffbdaece299d26d4f31a1d3fa1c09058877ca2820bfc27f33619562b86037842c444f110.output: Permission denied
ERROR [2021-05-07 11:46:08] 22411  Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2021-05-03&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
INFO [2021-05-07 11:46:08] 22411  false
ERROR [2021-05-07 11:46:08] 22411  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2021-05-03&format=json&trigger=archivephp: ''
WARNING [2021-05-07 11:46:08] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/f9795f3d9743fd490b36a7da3a976aedc786fd6499b25943b49796a4a6a2e71ce44a81e34824e6f106cc67aa39332d8065690.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
sh: 1: cannot create /var/customers/webs/mydomain/matomo/tmp/climulti/f9795f3d9743fd490b36a7da3a976aedc786fd6499b25943b49796a4a6a2e71ce44a81e34824e6f106cc67aa39332d8065690.output: Permission denied
ERROR [2021-05-07 11:46:08] 22411  Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2021-05-01&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
INFO [2021-05-07 11:46:08] 22411  false
ERROR [2021-05-07 11:46:08] 22411  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2021-05-01&format=json&trigger=archivephp: ''
WARNING [2021-05-07 11:46:08] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/b01f6f980caafba6922ae112138109b12760490e3228a95a237117fc7d9a1557672d67f59c6dfe3a77e328c3d32e1a39aa5c0.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
sh: 1: cannot create /var/customers/webs/mydomain/matomo/tmp/climulti/b01f6f980caafba6922ae112138109b12760490e3228a95a237117fc7d9a1557672d67f59c6dfe3a77e328c3d32e1a39aa5c0.output: Permission denied
ERROR [2021-05-07 11:46:09] 22411  Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&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
INFO [2021-05-07 11:46:09] 22411  false
ERROR [2021-05-07 11:46:09] 22411  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&format=json&trigger=archivephp: ''
INFO [2021-05-07 11:46:09] 22411  Finished archiving for site 1, 4 API requests, Time elapsed: 1.725s [1 / 2 done]
WARNING [2021-05-07 11:46:09] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
WARNING [2021-05-07 11:46:09] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2021-05-07 11:46:09] 22411  Start processing archives for site 3.
INFO [2021-05-07 11:46:09] 22411  Finished archiving for site 3, 0 API requests, Time elapsed: 0.011s [2 / 2 done]
WARNING [2021-05-07 11:46:09] 22411  /var/customers/webs/mydomain/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
WARNING [2021-05-07 11:46:09] 22411  /var/customers/webs/mbda/matomo/core/CliMulti/Process.php(186): Warning - file_put_contents(/var/customers/webs/mydomain/matomo/tmp/climulti/archive.sharedsiteids.pid): failed to open stream: Permission denied - Matomo 4.2.1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already)
INFO [2021-05-07 11:46:09] 22411  Done archiving!
INFO [2021-05-07 11:46:09] 22411  ---------------------------
INFO [2021-05-07 11:46:09] 22411  SUMMARY
INFO [2021-05-07 11:46:09] 22411  Processed 0 archives.
INFO [2021-05-07 11:46:09] 22411  Total API requests: 4
INFO [2021-05-07 11:46:09] 22411  done: 4 req, 1979 ms, 8 errors.
INFO [2021-05-07 11:46:09] 22411  Time elapsed: 1.979s
INFO [2021-05-07 11:46:09] 22411  ---------------------------
INFO [2021-05-07 11:46:09] 22411  SCHEDULED TASKS
INFO [2021-05-07 11:46:09] 22411  Starting Scheduled tasks...
INFO [2021-05-07 11:46:09] 22411  done
INFO [2021-05-07 11:46:09] 22411  ---------------------------
INFO [2021-05-07 11:46:09] 22411  ---------------------------
INFO [2021-05-07 11:46:09] 22411  SUMMARY OF ERRORS
INFO [2021-05-07 11:46:09] 22411  Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2021-05-07&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
INFO [2021-05-07 11:46:09] 22411  Error: Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2021-05-07&format=json&trigger=archivephp: ''
INFO [2021-05-07 11:46:09] 22411  Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2021-05-03&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
INFO [2021-05-07 11:46:09] 22411  Error: Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2021-05-03&format=json&trigger=archivephp: ''
INFO [2021-05-07 11:46:09] 22411  Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2021-05-01&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
INFO [2021-05-07 11:46:09] 22411  Error: Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2021-05-01&format=json&trigger=archivephp: ''
INFO [2021-05-07 11:46:09] 22411  Error: Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&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
INFO [2021-05-07 11:46:09] 22411  Error: Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&format=json&trigger=archivephp: ''
ERROR [2021-05-07 11:46:09] 22411  8 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2021-05-07 11:46:09] 22411  Uncaught exception: /var/customers/webs/mydomain/matomo/core/CronArchive.php(605): 8 total errors during this script execution, please investigate and try and fix these errors.
8 total errors during this script execution, please investigate and try and fix these errors.
  [Exception]
  8 total errors during this script execution, please investigate and try and fix these errors.

What can I do?
Where to start?

Matomo-Version: 4.2.1
MySQL-Version: 10.1.44-MariaDB-0+deb9u1
PHP-Version: 7.2.34

Any help would be great.
Thank you,
mickna

Mickna,

I’m rather new, and not an expert on any of this. However, I found a great place to find info. After logging into your Matomo website, at the top right side there is a Gear. Click that. On the left side of the page, a menu loads, Diagnostics is at the bottom of that menu option. If you click that, you can get to System Check. I found lots of info that helped me fix somethings on my web page. At least it gives you info to google. Hopefully that will help.

Hello Shane,

thank you for your replay.
I know this option and unfortunately (or should I say “luckily”) nearly all seams to be fine (beside that data integrity check fails, which seams to be a known problem).

Again, thank you Shane. I really appreciate every try to help me out :slight_smile:

PHP doesn’t seem to be allowed to write into its tmp directory. This is rather a PHP configuration/permission issue.

Hello Peterbo,

thank you. That’s what I thought too.
My Access rights are:
drwxr-x—
This should be fine. However, I do a temporary try with a 777.
Let’s see what’s happens…

Thank you,
mickna