Support » Plugin: Health Check & Troubleshooting » Trying to figure out the error “The REST API request failed due to an error.”

  • Hello,

    I am a senior Linux sysadmin, I have been using efficiently operating system logs for decades. I am new to website administration. I am helping with a website not setup by me.
    The plugin “Health Check & Troubleshooting” is reporting these error, but without context, so I have no clue about what in WordPress is causing them, nor where the plugin is getting them :

    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

    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 encountered: (0) cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

    Just laid out in this way, without mentioning the failing component which triggers the error, these messages are useless.

    So : can you help me figure out what I should do, so that I get more information about where and how the plugin gets this error ? So that I can eventually identify the real issue, what is failing ? Can we increase some verbosity somewhere ?

    Regards
    Robert

Viewing 3 replies - 1 through 3 (of 3 total)
  • Going further :
    I just created a staging clone of the website, and added the plugin “REST API log”; then I went back to Site Health, which ran the tests, then back to REST API LOG, where I got an entry; at this point, I don’t understand what I am reading; I am copying below the log :

    Route: /wp/v2/types/post
    Date: 2019-12-28 04:59:43
    Source: WP REST API
    Method: GET
    Status: 200
    Elapsed Time: 67ms
    Response Length: 2,915
    User: robert.grasso2@gmail.com
    IP Address: 127.0.0.1
    HTTP X Forwarded For: 127.0.0.1
    Download | Copy

    {
    “cookie”: “wordpress_sec_a0b7a2b532659ae3d2c5f816b4c29cfb=robert.grasso2@gmail.com|1577708903|dx6ta5bW8bnCatnpwMCQbs7wvXC5PmSvnAsAKMTDTnv|4e09c2d82fcc1335be3966e21821548effc2993264d8b194d6e69c12c45d6e28; _ga=GA1.2.1733504271.1577536024; _gid=GA1.2.2066760680.1577536024; wordpress_test_cookie=WP Cookie check; wordpress_logged_in_a0b7a2b532659ae3d2c5f816b4c29cfb=robert.grasso2@gmail.com|1577708903|dx6ta5bW8bnCatnpwMCQbs7wvXC5PmSvnAsAKMTDTnv|19db22a719dd1432c85b10e5d06e6c4d14ad502fa6dc6f3f1c570e6218f0e8ff; wfwaf-authcookie-946dbba11fddaac4eaef74e509bb90f5=1161|administrator|8dc6350263a0df59ffce56ec4830b0a206450709e5bc6cf462a019a9df7e5b8b; dapcookie_email=producer@theothersideofmidnight.com; dapcookie_password=DxKnCZ1NdWoQwCS8f5oM5w==; wp-settings-1161=hidetb=1&editor=tinymce&libraryContent=browse&align=left&urlbutton=file&imgsize=thumbnail; wp-settings-time-1161=1577536106; gadwp_wg_default_metric=sessions; gadwp_wg_default_dimension=30daysAgo; gadwp_wg_default_swmetric=sessions; PHPSESSID=lbab13fbr9uo5r7hvaui4th3pe”,
    “x_wp_nonce”: “5a531d59d1”,
    “cache_control”: “no-cache”,
    “referer”: “https:\/\/wordpress-65751-1107065.cloudwaysapps.com\/wp-json\/wp\/v2\/types\/post?context=edit”,
    “accept_encoding”: “deflate, gzip”,
    “accept”: “*\/*”,
    “user_agent”: “WordPress\/5.3.2; https:\/\/wordpress-65751-1107065.cloudwaysapps.com”,
    “connection”: “close”,
    “x_version”: “461”,
    “x_app_user”: “jmmrutaqsa”,
    “x_application”: “wordpress”,
    “x_forwarded_host”: “wordpress-65751-1107065.cloudwaysapps.com”,
    “x_forwarded_proto”: “https”,
    “host”: “wordpress-65751-1107065.cloudwaysapps.com”,
    “x_forwarded_for”: “127.0.0.1”,
    “x_real_ip”: “127.0.0.1”,
    “authorization”: “Basic bWt5ZGpudW5kdDplcDJLNGp5TnpC”
    }
    Download | Copy

    {
    “context”: “edit”
    }
    Download | Copy

    []
    Download | Copy

    {
    “Pragma”: “no-cache”,
    “Content-Type”: “application\/json; charset=UTF-8”,
    “X-Robots-Tag”: “noindex”,
    “Link”: “<https\/\/wordpress-65751-1107065.cloudwaysapps.com\/wp-json\/>; rel=”https\/\/api.w.org\/””,
    “X-Content-Type-Options”: “nosniff”,
    “Access-Control-Expose-Headers”: “X-WP-Total, X-WP-TotalPages”,
    “Access-Control-Allow-Headers”: “Authorization, Content-Type”,
    “Expires”: “Wed, 11 Jan 1984 050000 GMT”,
    “Cache-Control”: “no-cache, must-revalidate, max-age=0”,
    “X-WP-Nonce”: “5a531d59d1”,
    “Allow”: “GET”
    }
    Download | Copy

    {
    “data”: {
    “capabilities”: {
    “edit_post”: “edit_post”,
    “read_post”: “read_post”,
    “delete_post”: “delete_post”,
    “edit_posts”: “edit_posts”,
    “edit_others_posts”: “edit_others_posts”,
    “publish_posts”: “publish_posts”,
    “read_private_posts”: “read_private_posts”,
    “read”: “read”,
    “delete_posts”: “delete_posts”,
    “delete_private_posts”: “delete_private_posts”,
    “delete_published_posts”: “delete_published_posts”,
    “delete_others_posts”: “delete_others_posts”,
    “edit_private_posts”: “edit_private_posts”,
    “edit_published_posts”: “edit_published_posts”,
    “create_posts”: “edit_posts”
    },
    “description”: “”,
    “hierarchical”: false,
    “viewable”: true,
    “labels”: {
    “name”: “Posts”,
    “singular_name”: “Post”,
    “add_new”: “Add New”,
    “add_new_item”: “Add New Post”,
    “edit_item”: “Edit Post”,
    “new_item”: “New Post”,
    “view_item”: “View Post”,
    “view_items”: “View Posts”,
    “search_items”: “Search Posts”,
    “not_found”: “No posts found.”,
    “not_found_in_trash”: “No posts found in Trash.”,
    “parent_item_colon”: null,
    “all_items”: “All Posts”,
    “archives”: “Post Archives”,
    “attributes”: “Post Attributes”,
    “insert_into_item”: “Insert into post”,
    “uploaded_to_this_item”: “Uploaded to this post”,
    “featured_image”: “Featured Image”,
    “set_featured_image”: “Set featured image”,
    “remove_featured_image”: “Remove featured image”,
    “use_featured_image”: “Use as featured image”,
    “filter_items_list”: “Filter posts list”,
    “items_list_navigation”: “Posts list navigation”,
    “items_list”: “Posts list”,
    “item_published”: “Post published.”,
    “item_published_privately”: “Post published privately.”,
    “item_reverted_to_draft”: “Post reverted to draft.”,
    “item_scheduled”: “Post scheduled.”,
    “item_updated”: “Post updated.”,
    “menu_name”: “Posts”,
    “name_admin_bar”: “Post”
    },
    “name”: “Posts”,
    “slug”: “post”,
    “supports”: {
    “title”: true,
    “editor”: true,
    “author”: true,
    “thumbnail”: true,
    “excerpt”: true,
    “trackbacks”: true,
    “custom-fields”: true,
    “comments”: true,
    “revisions”: true,
    “post-formats”: true
    },
    “taxonomies”: [
    “category”,
    “post_tag”
    ],
    “rest_base”: “posts”
    },
    “headers”: {
    “Allow”: “GET”
    },
    “status”: 200
    }

    Plugin Author Marius L. J.

    (@clorith)

    Hiya @rgrasso2,

    Apologies for the late reply, it does sound like you are having the same errors as another user, would you please follow the steps outlined in https://wordpress.org/support/topic/critical-errors-3/#post-12291927 and see if the problem goes away (this will identify if it’s a plugin/theme causing issues, or a config of some sort).

    It’s okay, we were all resting with days off.

    Hey, this was great ! And helpful ! In Troubleshooting mode, there was no error ! After a quick search : it is my membership plugin 🙁 🙁

    So, what now ? I mean :
    – generally speaking : can we figure out why this is happening ? The membership plugin is working nicely – there is a really minor feature which does not seem to work (a map with the localization of the IP addresses logging in), I don’t care
    – is this serious ? I know curl from my Linux command-line, but in Web context, as you people are using it, I am a little disoriented …
    – should I get back to the membership plugin developers ? if I should, what should I tell them ?

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