Loading

How Omni Gateway applies the Response Timeout policy vs the gateway-level Upstream Response timeout

Publiceringsdatum: Oct 8, 2026
Beskrivning

Omni Gateway has two settings that control how long the gateway waits for an upstream (backend) response:
- Gateway level: Runtime Manager > Omni Gateway > Runtime Configuration > Timeouts > Upstream Response
- API instance level: the Response Timeout policy in API Manager

The documentation states: "By default, all Omni Gateway API instances have a response timeout of 15 seconds. Apply the policy to override the default timeout."

The gateway-level value is often assumed to be a hard ceiling, so that the lower of the two values applies. That leads to this expected vs actual behavior:
- Expected: gateway Upstream Response = 30s and Response Timeout policy = 40s. A backend that responds in 35s times out at 30s.
- Actual: the request succeeds after 35s. No error is returned and nothing is logged.

Applies to:
- Managed Omni Gateway (CloudHub 2.0) and Self-Managed Omni Gateway in Connected Mode, 1.12.0 and later (Runtime Configuration tab)
- Response Timeout policy 1.0.0

Lösning

This is expected behavior. The two settings apply at different scopes:
- The gateway-level Upstream Response timeout is the default for all API instances on the gateway. This is the "15 seconds" in the documentation.
- The Response Timeout policy gives granular control over one API instance. It replaces the gateway default for that API instance and is not capped by it.

Effective upstream response timeout for an API instance:
1. The Response Timeout policy value, if the policy is applied to that API instance.
2. Otherwise, the gateway-level Upstream Response value (default 15 seconds).

Examples:
- Gateway 30s, policy 40s on API A: API A times out at 40s. Every other API on the gateway times out at 30s.
- Gateway 40s, policy 30s on API A: API A times out at 30s and returns 504 (upstream request timeout). Every other API times out at 40s.
- Gateway 30s, no policy: every API on the gateway times out at 30s.

Recommended configuration:
1. Set the gateway-level Upstream Response timeout to the value that suits most APIs on the gateway.
2. Apply the Response Timeout policy only to API instances that need a different value, higher or lower.
3. Make sure the other timeouts on the path are longer than the intended response time:
   - Stream Idle timeout (default 300 seconds)
   - client-side HTTP timeouts
   - load balancers or proxies in front of the gateway

To verify which value applies:
1. Apply the Response Timeout policy to a test API instance with a value lower than the gateway setting, for example policy 20s with the gateway at 30s.
2. Call a backend that responds after the policy value, for example after 25s.
3. The gateway returns 504 after about 20s. This confirms that the policy value, not the gateway value, applies to that API instance.

Ytterligare resurser

- Response Timeout Policy: https://docs.mulesoft.com/gateway/latest/policies-included-response-timeout
- Configure Timeouts for Managed Omni Gateway: https://docs.mulesoft.com/gateway/latest/managed-timeout
- Omni Gateway release notes (timeouts introduced in 1.9.0; Runtime Configuration tab in 1.12.0): https://docs.mulesoft.com/release-notes/gateway/gateway-release-notes
- Response Timeout policy release notes: https://docs.mulesoft.com/release-notes/gateway/policies/response-timeout-release-notes

Knowledge-artikelnummer

005461443

 
Laddar
Salesforce Help | Article