Documentation

What to do if your error log returns a cURL error 28: Connection timed out error?

One of the debugging processes that we advise our customers when debugging an issue is to have you enable your plugin’s debug mode. make the transaction again and provide us the debug log as seen from our support article.
You might look through its contents and notice the following error: “cURL error 28 : Operation timed out…” as seen from the screenshot below.

 

Image 2021-09-20 at 6.09.13 PM

 

What does this error mean?

When a transaction is processed, your payment provider (e.g. ePDQ, Lloyds, Authipay) needs to make a request/talk/communicate to/from the server where your website is hosted to tell them that the transaction is OK or to process the payment.  However, due to some possible configurations on your server, the request to/from your payment provider may be blocked or rejected.

There are also some reports that it has been due to some plugin conflicts, particularly, plugins that could also be trying to perform the same request within your site. Basic debugging, such as temporarily deactivating newly installed, or updated plugins would be helpful in trying to isolate this possibility.

What are the next steps that you can take?

For the case above, the request is being possibly blocked because of the following:

  • your PHP version is outdated.
  • your memory server limits are not enough.
  • your hosting provider may have a firewall/security that blocks the specific request.

To resolve these issues, you’ll have to reach out to your hosting provider so that they can diagnose the issue from their end and make necessary adjustments.

For some instances where you need to override the default value we set for the timeout value of an HTTP request, you can use this filter – “http_request_timeout“.This is defined in the plugins’ class-helper file – …/inc/classes/class-helpers.php at line 203. Here’s an example of how you can extend the time before the request times out:

add_filter('http_request_timeout', function ($value, $url) {
return 30; //change the value to a higher one if needed
}, 99, 2);

This snippet should be written at the bottom of your theme or child theme’s function.php file. Please feel free to contact our support team if you have further questions or clarification regarding these – https://weareag.co.uk/support/

Was this helpful?

Still need help?

Our team are on hand to provide fast, helpful and professional support.

Support request

AG Bot (BETA) - Not live chat

Ask our bot about our products.

Welcome to our AG Bot, powered by OpenAI and trained on our documents and product pages. By continuing to use this service, please keep in mind:

Your continued use indicates acceptance of these terms. We hope you find our AI Chatbot useful!

Hello! I am AG Bot, how can I help you? (Not live chat)