• Resolved tobaco

    (@tobaco)


    The endpoint testing seems to occur every 10 minutes. In some setups, these tests (wp_remote & file_get_contents) fail with a timeout. This causes the whole system to hang for at least 10 seconds (2 times 5000ms). And this happens every 10 minutes, even when not logged in.

    So it would be nice to have an option to always fall back to the rest api tracking.

    (The reason for the timeout, is something I couldn’t find out by now.)

Viewing 1 replies (of 1 total)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @tobaco,

    Thanks for reporting the issue. The testing only occurs every 10 minutes if the last test fails: if the test succeeds, the interval is 24 hours.

    To prevent this from happening every 10 minutes, I’ve added a filter here:
    https://github.com/Burst-Statistics/burst/tree/add-time-between-endpoint-test-filter

    You can install it using the green button, and download the zip file. The deactivate your current Burst plugin, and install this one like a normal plugin.

    If you add the following snippet as a mu-plugin you can override the test interval:

    /**
     * Override the default time between tests, which is 10 minutes when the last test returned an error, and 24 hours otherwise.
     * 
     * @param int $time_between_tests //the time between tests in seconds
     * @return int
     */
    function burst_time_between_tests(int $time_between_tests ): int
    {
        return WEEK_IN_SECONDS;
    }
    add_filter( 'burst_time_between_tests', 'burst_time_between_tests' );

    This will be merged in one of the upcoming releases, it will be mentioned in the changelog.

    Let me know if this helps!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.