MuleSoft · HTTP Connector
Remotely closed
Short answer
A Remotely closed error means the HTTP connector reused a pooled connection that the remote system had already closed. Set Connection Idle Timeout on the HTTP Request configuration lower than the remote system's idle timeout, for example 10000 to 12000 milliseconds.
VerifiedLast verified
01Error text
Remotely closed
Remote host closed connection02Likely causes
- The connector reuses a stale pooled connection when
connectionIdleTimeoutis longer than the remote system's idle timeout. - CloudHub 2.0 ingress closes idle connections after 15 seconds.
- Salesforce typically closes connections after 30 seconds of inactivity.
03How to fix it
- Find the idle or keep-alive timeout of the remote system or of the load balancer in front of it.
- Set Connection Idle Timeout on the HTTP Request configuration to a lower value, for example
connectionIdleTimeout="12000". The docs recommend less than 15000, for example 10000 to 12000. - Know the built-in retry: on a Remotely Closed error the operation retries PUT, DELETE, GET, HEAD, OPTIONS and TRACE requests three times. The property
mule.http.client.maxRetrieschanges the count, and 0 turns the retry off. - To extend the built-in retry to every method, set
mule.http.client.retryOnAllMethods=true. Do this only if repeating the request is safe.
04Official documentation
→Related errors
- HTTP:CONNECTIVITYHTTP:CONNECTIVITY means the HTTP Request operation could not establish a connection to the server. Check the host, port, protocol and TLS settings, and add your own retry because the operation does not use the reconnection strategy for retries.
- HTTP:TIMEOUTHTTP:TIMEOUT means a request sent by the HTTP Request operation timed out before the response arrived. The wait is set by Response Timeout, which is 10000 milliseconds unless you change it, so raise it or make the remote service answer faster.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer