Connect Timed Out Error

What should I do when I see this error in the Asaas Webhook logs?

A Connect Timed Out error in the Webhook Logs indicates that Asaas could not establish a connection with the server responsible for receiving the event.

The failure occurs before your application processes the payload. Investigate the endpoint's availability, DNS, network, firewall, and infrastructure.

Connect Timed Out or Read Timed Out?

The errors represent different stages of the communication.

ErrorWhat happened
Connect Timed OutThe connection to the endpoint was not established.
408 - Read Timed OutThe connection was established, but the application did not respond within the expected time.

Connect Timed Out

%%{init: {"flowchart": {"nodeSpacing": 18,"rankSpacing": 24,"diagramPadding": 4,"padding": 7}}}%%
flowchart TD
    A["Try to establish a connection"] --> B["Connection is not completed"]

    classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px
    classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px

    class A inicio
    class B sucesso

    linkStyle default stroke:#94A3B8,stroke-width:2px

Read Timed Out

%%{init: {"flowchart": {"nodeSpacing": 18,"rankSpacing": 24,"diagramPadding": 4,"padding": 7}}}%%
flowchart TD
    A["Establish a connection"] --> B["Response not received in time"]

    classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px
    classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px

    class A inicio
    class B sucesso

    linkStyle default stroke:#94A3B8,stroke-width:2px

If the connection is established but the response takes too long, see Error 408 - Read Timed Out.

Main causes

Connect Timed Out may occur due to:

  • server or application unavailable;
  • temporary provider outage;
  • network failures;
  • incorrectly configured DNS;
  • firewall blocking the connection;
  • the port used by the endpoint is closed;
  • overloaded shared hosting;
  • high CPU or memory usage;
  • limit of simultaneous connections;
  • load balancer problems;
  • timeout in the infrastructure or at the provider.

Since the connection was not established, do not investigate the payload content before validating the endpoint's connectivity.

How to investigate

1. Check whether the endpoint is available

Test the address configured in the Webhook:

https://minhaapi.com/webhook

Confirm that:

  • the application is running;
  • the web server is available;
  • the domain is active;
  • the endpoint is externally reachable.

If the application is running but the address cannot be reached externally, continue the investigation at the DNS, network, and firewall layers.

2. Check the DNS

Confirm that the domain resolves to the correct destination and that recent DNS changes have already propagated.

Also review proxy or load balancer settings that may forward the request to an unavailable destination.

3. Check the firewall and ports

Confirm that:

  • the port used by the endpoint is open;
  • there are no rules blocking Asaas IPs;
  • Security Groups, proxies, and firewalls allow the connection;
  • Cloudflare or another WAF is not blocking the traffic.

See the official Asaas IPs.

If you use Cloudflare, also see CloudFlare Firewall Blocking.

If the firewall explicitly responds with HTTP 403, use the troubleshooting flow for Error 403 (Forbidden).

4. Check the infrastructure resources

Monitor:

  • CPU;
  • memory;
  • disk usage;
  • number of open connections;
  • web server availability;
  • load balancer health.

Resource or connection limits can prevent new connections from being established.

5. Check the provider

Check the status of the infrastructure used by the application, such as:

  • AWS;
  • Azure;
  • GCP;
  • Hostinger;
  • KingHost;
  • VPS;
  • shared hosting.

An external outage can also prevent Asaas from establishing the connection.

Common scenarios

Server unavailable

%%{init: {"flowchart": {"nodeSpacing": 28,"rankSpacing": 32,"diagramPadding": 8,"padding": 10}}}%%
flowchart TD
    A["Asaas starts the connection"] --> B["Server is unavailable"]
    B --> C["Connection is not established"]
    C --> D["Record Connect Timed Out"]
    D --> E["Make a new attempt"]

    classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px,font-size:17px
    classDef validacao fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E,stroke-width:2px,font-size:17px
    classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px,font-size:17px

    class A inicio
    class B,C,D validacao
    class E sucesso

    linkStyle default stroke:#94A3B8,stroke-width:2px

Firewall blocking the connection

%%{init: {"flowchart": {"nodeSpacing": 28,"rankSpacing": 32,"diagramPadding": 8,"padding": 10}}}%%
flowchart TD
    A["Asaas starts the connection"] --> B["Firewall blocks the port"]
    B --> C["Connection times out"]
    C --> D["Record Connect Timed Out"]

    classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px,font-size:17px
    classDef validacao fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E,stroke-width:2px,font-size:17px
    classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px,font-size:17px

    class A inicio
    class B,C validacao
    class D sucesso

    linkStyle default stroke:#94A3B8,stroke-width:2px

What happens while the error persists

While Asaas cannot establish the connection:

  • events are not delivered;
  • new attempts are made automatically;
  • the configuration enters the penalty mechanism;
  • after 15 consecutive failures, the Webhook queue is interrupted;
  • new events continue to be generated and stored;
  • pending events remain stored for up to 14 days and may be permanently deleted after that period.

Understand Queue penalty.

How to validate the fix

After restoring connectivity:

  1. confirm that the endpoint is externally reachable;
  2. check that DNS, firewall, port, and infrastructure are working;
  3. if the queue is interrupted, reactivate the configuration;
  4. generate or wait for a new event;
  5. check the Webhook Logs.

The fix is complete when new attempts no longer record Connect Timed Out and the endpoint receives requests normally.

If the error changes to 408 - Read Timed Out, the connection was restored, but the application still needs to reduce its response time.

Next steps


Did this page help you?