MuleSoft · HTTP Connector
HTTP:GATEWAY_TIMEOUT
Short answer
HTTP:GATEWAY_TIMEOUT means a server acting as a gateway or proxy did not receive a response from its upstream within the specified time (HTTP 504). The timeout happened behind the gateway, not in your Mule app's own Response Timeout.
VerifiedLast verified
01Error text
Error type: HTTP:GATEWAY_TIMEOUT02Likely causes
- The server acting as a gateway or proxy to manage the request did not receive a response within the specified time.
- HTTP Connector treats any status code from 500 through 599 as a failure and raises an error.
03How to fix it
- Find out which upstream service is slow, and what timeout the gateway or proxy applies.
- Reduce the work the request triggers, or have the gateway's timeout raised by its owner.
- If a retry is safe, wrap the request in an Until Successful scope and set
maxRetriesandmillisBetweenRetries. - Handle the failure with an error handler of type
HTTP:GATEWAY_TIMEOUT.
iNotes
HTTP:TIMEOUT is the different error raised when your own request times out waiting for a response.
04Official documentation
→Related errors
- 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.
- HTTP:BAD_GATEWAYHTTP:BAD_GATEWAY means a server acting as a gateway or proxy received an invalid response while handling your request (HTTP 502). The fault is behind that gateway, so check the upstream service and retry.
- HTTP:SERVICE_UNAVAILABLEHTTP:SERVICE_UNAVAILABLE means the server could not handle the request because it is down for maintenance or overloaded (HTTP 503). The fault is on the remote side, so retry after a delay and handle the error if the service stays down.
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