Connect Timed Out Error

What does it mean

The Connect Timed Out error in Webhook logs indicates that Asaas was unable to establish a connection with the server responsible for receiving events.

Unlike the 408 - Read Timed Out error, where the connection is established but the application takes too long to respond, with Connect Timed Out the connection itself is never completed.

This means the problem occurs before the webhook is processed.


How it works

When an event occurs, Asaas attempts to establish a connection with the configured URL.

If the server does not respond within the expected time, the attempt is aborted and the webhook is recorded with a Connect Timed Out error.

As long as the issue persists, new attempts will be made according to the Asaas retry policy.

If 15 consecutive failures occur, the Webhook queue will be interrupted.


When does this error occur?

The most common causes are:

  • server downtime;
  • temporary provider outages;
  • network failures;
  • incorrect DNS configuration;
  • firewall blocking;
  • closed ports;
  • overloaded shared hosting;
  • high CPU or memory usage;
  • connection limits being reached;
  • stopped applications;
  • load balancer issues;
  • hosting provider timeouts.

Impact on the integration

As long as the endpoint remains unavailable:

  • events will not be delivered;
  • automatic retries will occur;
  • the queue will be penalized;
  • after 15 consecutive failures, the queue will be interrupted;
  • new events will continue to accumulate;
  • events remain stored for up to 14 days;
  • events that are not processed after this period will be permanently deleted.

For this reason, it is important to restore endpoint availability as quickly as possible.


Difference between Connect Timed Out and Read Timed Out

ErrorWhat happened
Connect Timed OutThe connection could not be established
Read Timed OutThe connection was established, but the application did not respond in time

In summary:

Connect Timed Out
↓
Could not establish connection
Read Timed Out
↓
Connected, but no response was received

How to investigate

1. Verify that the server is online

Test the URL directly:

https://myapi.com/webhook

Make sure that:

  • the application is running;
  • the domain is active;
  • the URL responds correctly.

2. Verify DNS settings

Confirm that the domain is pointing to the correct destination.

DNS issues may prevent Asaas from locating the server.


3. Check firewall settings

Ensure that:

  • the HTTPS port is open;
  • there are no IP restrictions;
  • the firewall is not rejecting connections.

If you use Cloudflare or a WAF, review the configured rules as well.


4. Check server resources

On shared hosting or resource-constrained servers, it is common to encounter:

  • memory exhaustion;
  • excessive CPU usage;
  • too many simultaneous connections.

Monitor:

  • CPU usage;
  • memory consumption;
  • disk utilization;
  • number of open connections.

5. Verify provider availability

The issue may occur with providers such as:

  • AWS;
  • Azure;
  • GCP;
  • Hostinger;
  • KingHost;
  • VPS providers or shared hosting services.

Check whether there are any temporary outages.


Common scenarios

Asaas
↓
Connection attempt
↓
Server offline
↓
Connection not established
↓
Connect Timed Out
↓
Automatic retry

Another scenario:

Asaas
↓
Connection attempt
↓
Firewall blocks the port
↓
Timeout
↓
Connect Timed Out

Best practices

  • monitor server availability;
  • use HTTPS;
  • monitor CPU and memory usage;
  • avoid highly constrained hosting environments;
  • configure availability alerts;
  • use load balancers when necessary;
  • monitor DNS and SSL certificates;
  • maintain application and server logs.

Common mistakes

  • restarting only the application and forgetting the web server;
  • changing DNS settings without considering propagation time;
  • blocking ports in the firewall;
  • using overloaded shared hosting environments;
  • assuming the issue is related to the webhook payload;
  • reviewing only Asaas logs and ignoring server logs.

How to verify that it worked

After fixing the issue:

  1. Reactivate the Webhook queue.
  2. Generate a new event.
  3. Check the logs.

If everything is working correctly:

  • connection errors will no longer occur;
  • events will be delivered normally;
  • the queue will be processed in chronological order.

Next steps

If you continue experiencing issues, we recommend consulting: