Local Community

Error: cURL error 28: Operation timed out after 10010 milliseconds with 0 bytes received (http_request_failed)

I got 2 critical issues on the site health in all of my new wordpress installations

  1. The REST API encountered an error —Performance

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 10010 milliseconds with 0 bytes received (http_request_failed)

  1. Your site could not complete a loopback request —Performance
    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 10006 milliseconds with 0 bytes received (http_request_failed)

Hey,

I have simillar problems with the Woocommerce-API. I am working on a plugin and since a few days I always get the error: Error: cURL error 28: Operation timed out after 10008 milliseconds with 0 bytes received.

The weird thing is that when I debug every step with xDebug the same API-Call works. Also the same call from Postman works without a problem. My site doesn’t react anymore when I don’t run the debugger in PHP (VS-Code) which was problem before. I tried to change the xDebug config and installed everything new but no luck so far.

My guess is that since the newest update of local something is off. I will try to find the issue and if nothing helps I will go back to a previous version. If I find something I will let you know.

This isn’t new. This issue has been discussed in WordPress circles for a few years, and outside of WordPress for at least a decade. I was struggling with this here in this forum with Local last year, and again just recently. It’s a real pain.
Refs:

(my detailed post)

This is also not specific to Local or Woocommerce or other applications. It’s not Windows-only. It doesn’t seem to be WordPress-specific. Here’s what I’ve learned in my own installation - your experience / symptoms / results may vary:

  1. None of the solutions offered in blogs or forums help.
  2. Most open requests for help on this topic are eventually closed without resolution. Closed reports seem to have been self-inflicted errors and I can’t determine the cause/fix in those situations.
  3. This seems to be specific to a loopback with Apache when cURL is used in PHP. It does not happen when running curl from the command-line to localhost or 127.0.0.1, for example to trigger wp-cron.
  4. I do not think this is related to security. I’ve turned off Windows firewall, deleted and/or disabled all security. I’ve temporarily disabled SSL/TLS with my Local sites.
  5. I do not think this is an Apache issue. The Local environment configures the Apache server and sites for us (yay). I have not been able to resolve this with changes in Apache configs, for example to call the same site on a different port, with changes to the server name, getting “localhost” to resolve to the same site as “mysite.local”, etc. I have probably not been thorough here.
  6. I do not think this is related to /etc/hosts.A
  7. I do not think this is related to my NIC, a policy, or network configuration. I’m on a laptop, LAN, DHCP. Again, a loopback request from the command-line works.

Given all of that, my best guess at this point is that there is something in the default (or a minimal) Apache and/or PHP configuration in Local that is causing this for us. I’ve gone through all Apache and PHP settings that are in the configs and I can’t find anything that impacts this - however there might be some setting that I have not added into the Apache configs or php.ini that would change a behavior related to this.

I’m really hoping Local/WPEngine Support can take a look at this. I’m anxious to help.


Refs:

https://www.dedoimedo.com/computers/wordpress-site-health-curl-error-28.html