• Resolved r1baum

    (@r1baum)


    Hi,

    the archiving process of Matomo stopped working in our setup.
    Is see hundreds of such error messages in our log files:

    From WP->Matomo->Diagnose:

    ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&format=json&segment=referrerName%3D%3Dnl_20210912_Reminder&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=year&date=2021-01-01&format=json&segment=referrerName%3D%3Dnl_20210912_Reminder&trigger=archivephp: \’\” ‘548 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:343; class-wp-hook.php:290; class-wp-hook.php:316; plugin.php:551; wp-cron.php:138;

    From our PHP error logs:
    [24-Sep-2021 04:56:40 UTC] PHP Fatal error: Uncaught Exception: 548 total errors during this script execution, please investigate and try and fix these errors. in [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/CronArchive.php:599
    Stack trace:
    #0 [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/CronArchive.php(592): Piwik\CronArchive->logFatalError(‘548 total error…’)
    #1 [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/CronArchive.php(265): Piwik\CronArchive->end()
    #2 [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/Access.php(673): Piwik\CronArchive->Piwik\{closure}()
    #3 [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/CronArchive.php(269): Piwik\Access::doAsSuperUser(Object(Closure))
    #4 [DOCUMENT_ROOT]/wp-content/plugins/matomo/classes/WpMatomo/ScheduledTasks.php(330): Piwik\CronArchive->main()
    #5 [DOCUMENT_ROOT]/wp-includes/class-wp-hook.php(290): WpMatomo\ScheduledTasks->archive()
    #6 [DOCUMENT_ROOT]/wp-includes/class-wp-hook.php(316): WP_Hook->apply in [DOCUMENT_ROOT]/wp-content/plugins/matomo/app/core/CronArchive.php on line 599

    Memory Limit is already at 512MB and no SegFaults or what so ever in our log files.

    Any advice would be very appreciated.

    Best
    Max

Viewing 7 replies - 1 through 7 (of 7 total)
  • hi @r1baum

    Sorry to hear that you encounter some errors with our plugin.
    Do you also encounter some errors when running manually the archive process? You can launch it from the menu Matomo Analytics > Diagnostics > Troubleshooting.
    You can also try to disable the asynchronous archiving process by adding in your wp-config.php file the following line:
    define( 'MATOMO_SUPPORT_ASYNC_ARCHIVING', false );
    Let me know if this solve your issue.

    Kind regards

    Matthieu

    Thread Starter r1baum

    (@r1baum)

    Hi,

    thank you for your feedback.

    Running the archive process manually ends up in a timeout.

    I think i missed the LOGS part of Matomo Analytics > Diagnostics the last time but there i see error messages like this:

    archive_boot 2021-09-28 08:39:33 Matomo error: 8: Undefined index: REQUEST_METHOD in $abs_path/wp-content/plugins/pretty-link/app/controllers/PrliAppController.php:33 => bootstrap.php:56; bootstrap.php:85; PrliAppController.php:33; pretty-link.php:200; wp-settings.php:391; wp-config.php:39; wp-load.php:37; bootstrap.php:95; console:11;
    WordPress

    I assume the archive process does not run in a webserver context and because of this all lazzy written plugins generate all kind of warnings / errors.

    I fixed all of them manually and now i wait for the archiving processed to run again. I post an update if this did the trick.

    Thread Starter r1baum

    (@r1baum)

    UPDATE:
    Fixing the PHP warnings of 3rd party plugins did not resolve the issue.
    Something else is causing this errors.

    Not sure if it is a coincidence but the last successful archive cron was just before we installed the Matomo update to 4.4.2 (from 4.3.1)
    Looking into the Version history we skipped the update to 4.4.1
    Was there a kind of database update included in 4.4.1 which 4.4.2 is expecting but we never had?

    Thread Starter r1baum

    (@r1baum)

    UPDATE:
    After searching for some hints to solve this problem i found out that more users have the same problem.
    https://forum.matomo.org/t/uncaught-exception-matomo-core-cronarchive-php-599-got-invalid-response-from-api-request/42849/13

    A common thing is that the problems started with the upgrade to version 4.4.1

    hi @r1baum

    there was no database upgrade in the version you specify.

    Have you tried to disable the asynchronous archiving?

    If the archiving ends in a timeout, maybe your resources are too low. Could you share your system report available from Matomo Analytics > Diagnostics?

    Kind regards

    Mat

    • This reply was modified 3 years, 2 months ago by mattmary.

    Hi @r1baum

    Are there any chances you read my previous comment?
    Do you need any further help?

    Kind regards

    Mat

    Hi @r1baum

    without any answer I close this topic.
    If you need further assistance feel free to open a new one.
    Kind regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Matomo Cron Archive Server Errors’ is closed to new replies.