vendredi 8 janvier 2021

How to fix cURL error 28: connection timed out after X milliseconds

Are you seeing cURL 28: Login timed out error on your WordPress site?

cURL error 28 is a common WordPress REST API issue that can affect your website performance and cause unpredictable behavior.

In this article, we are going to show you how to easily fix "cURL error 28: Connection timed out" issue on your WordPress website.

 How to  's cURL error 28: the connection timed out after X milliseconds

What is cURL in WordPress?

The cURL is a software utility used by WordPress and many other web applications to send and receive data requests using URLs.

WordPress uses cURL to handle multiple API requests. It is available as a programming extension PHP language, and your The WordPress hosting company takes care of that.

The cURL library plays a crucial role in how WordPress works behind the scenes. If it isn 't set up correctly, your WordPress website will not work properly.

What are causes of cURL 28 error in WordPress?

Failure to respond to server data requests in a timely manner causes cURL 28 error in WordPress.

WordPress uses the REST API (a techniqueprogramming) to send and receive data requests. If these requests time out you will see it as a critical issue in the Site status with title 'REST API encountered in error '.

The error extension will show you more details including the error message:

Error: cURL error 28: operation timed out after x milliseconds with x bytes received (http_request_failed)

You may also see another related issue with the title "Your site could not complete a loopback request ". It will get a similar error message with the following deion.

"The loopback request on your site has failed, this means the features that depend on it are currently not working as expected."

What is what can cause cURL to expire?

A number of scenarios can cause cURL to expire in WordPress.

For example, a The parent plugin -fire WordPress can block a REST API request by treating it as suspicious activity.

If your DNS server is not functioning properly, it can also fail HTTP requests and cause the 'cURL timeout error inWordPress.

An improperly configured WordPress hosting server may simply have a very low timeout threshold which can prevent some WordPress processes from functioning properly.

That being said, let's take a look at how to troubleshoot and fix the "curl error 28: connection timed out" issue in WordPress.

1. Temporarily disable the WordPress firewall

If you are using a WordPress firewall or a security plugin , then temporarily disable it.

 'cURL error 28: connection timed out after X milliseconds

After that, you need to visit the WordPress site health report page to see if your issue is resolved.

If this is the case then you should check your WordPress firewall logs to see which API requests were blocked.

This would identify the source of the problem or you can adjust firewall settings to not block legitimate API requests.

2. Disable all WordPress plugins

WordPress plugins make their own API requests to send and receive data. If these calls are too frequent or take too long, it may result in the cURL error in your site health report.

The solution The way To understand this is to disable all WordPress plugins. Just go to the Plugins »Installed Plugins page and select all plugins.

 How to fix error 28 cURL: connection timed out after X milliseconds

After that click on the Bulk Actions drop-down menu to select "Disable" and then click the "Apply" button.

You can now view the Site Status report to see if the problem is gone. If that fixed the problem, you can can start activating your plugins one by one until the problem reappears.

This will help you find the plugin that may be causing the problem and then you can ask for it. 'plugin author help.

3. Make sure your hosting server is running the latest software

The next step is to make sure that yourWordPress hosting server uses the latest version of PHP versions, cURL library and OpenSSL.

You can check this by looking at the System Information tab under the Tools »Site Status page.

Just go to the 'Info ' tab and expand the "Server" section. From here you can get the information about the software installed on your WordPress hosting server.

Ideally, your server should be running PHP 7.4.13 or higher, curl 7.74.0 or higher, and OpenSSL 1.1.1 or higher.

If it 's not case, you should contact your WordPress host and ask them to update your hosting account software.

4. Troubleshoot SSL insecure content

If your WordPress site is using HTTPS / SSL , but it 's not configured correctly, it could also cause your web server to block unsecured cURL requests.

Likewise, if your site WordPress doesn 't use HTTPS / SSL, butthat it made an API call using an HTTP URL, those requests will also fail and you may see the following cURL error instead:

'Error: cURL error 7: failed to connect to port 443 from local host: connection refused (http_request_failed)

To resolve this problem, you can ask your web host to reinstall the SSL certificate for your website. If the problem persists, follow our guide on how to troubleshoot common SSL problems to properly configure SSL on your WordPress website.

5. Get help from the hosting provider

If the above steps fail to resolve cURL 28 error on your WordPress site, the problem is most likely a hosting environment issue.

Many factors cannot be checked and corrected only by your host. For example, if their DNS servers are unable to resolve requests in a timely manner, this will cause cURL requests to time out.

Another scenario could be slower connectivity or an es network problem with your hosting server.

Simply send them a support request with the details of the error and their technical staff can troubleshoot and apply a fix for it.to resolve.

We hope this article has helped you learn how to fix cURL 28 error in WordPress. You can also bookmark our WordPress Troubleshooting Tips and our ultimate manual on fix common WordPress errors .

If you liked this article, please subscribe to our YouTube channel for tutorials WordPress video. You can also find us on Twitter and Facebook .

Aucun commentaire:

Enregistrer un commentaire