A connection timeout error occurs when attempting to make an outbound request (e.g., via an HTTP Requestor) from a Mule application. This error can manifest in several ways:
The underlying behavior observed at the network level is that the three-way TCP handshake completes successfully, but the client application (Mule) fails to send the next expected data packet, such as the ClientHello to initiate the TLS handshake. Due to this delay, the remote server or an intermediary network device closes the idle connection, resulting in a timeout.
This issue is most common when processing large payloads.
The primary cause of this delay is the use of deferred execution in a DataWeave transformation (deferred=true) immediately before the connector making the network call (e.g., HTTP Requestor).
When deferred=true is used, the execution of the DataWeave script is postponed until the payload is actively consumed by the subsequent component. The process is as follows:
This latency between the TCP connection establishment and the sending of the first application data bytes can exceed the remote server's timeout threshold, causing it to close the connection prematurely.
There are two main solutions to resolve this issue. The choice depends on your application's requirements and memory handling capabilities.
This forces the DataWeave transformation to complete before the HTTP Requestor begins its execution. This ensures the payload is fully ready at the moment the connection is established.
Configure the HTTP Requestor to not use streaming transfer mode. This causes the connector to wait for the entire payload to become available and load it into memory before sending the request. Like the first option, this resolves the latency.
005135165

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.