Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Update: Looks like it’s a known WP bug! Found this post: https://wp-customerarea.com/support/topic/rest-api-loopback-issues-plus-plugin-looks-abandoned/

    Add this code will fix it for now!
    /**
    * Write session to disk to prevent cURL time-out which may occur with
    * WordPress (since 4.9.2),
    * or plugins such as “Health Check”.
    */
    function custom_wp_fix_pre_http_request($preempt, $r, $url)
    {
    // CUSTOM_WP_FIX_DISABLE_SWC can be defined in wp-config.php (undocumented):
    if ( !defined(‘CUSTOM_WP_FIX_DISABLE_SWC ‘) && isset($_SESSION)) {
    if (function_exists(‘get_site_url’)) {
    $parse = parse_url(get_site_url());
    $s_url = @$parse[‘scheme’] . “://{$parse[‘host’]}”;
    if (strpos($url, $s_url) === 0) {
    @session_write_close();
    }
    }
    }

    return false;
    }
    add_filter(‘pre_http_request’, ‘custom_wp_fix_pre_http_request’, 10, 3);

    Plugin works, but same issue, latest WP version 5.4.1


    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

    The REST API request failed due to an error.
    Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

    Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

    The loopback request to your site failed, this means features relying on them are not currently working as expected.
    Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

Viewing 2 replies - 1 through 2 (of 2 total)