---
schema_version: "1"
id: 63a2d168bfcbcc8afc974091619ebecfd9307b9c7b7848974eb2d2d42e3cfc91
title: Response Timeout Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/policies-included-response-timeout.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/policies-included-response-timeout
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 9ae56ca44bdf6d97fb7497b2dcf0f14b524edb4c41b5b80a835e46abf0236108
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
---
product: Omni Gateway
version: 1.12
keywords: basic authentication, api gateway, flex gateway, gateway, policy
---

# Response Timeout Policy

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Policy Name</strong></p></td><td><p>Response Timeout</p></td></tr><tr><td><p><strong>Summary</strong></p></td><td><p>Sets the maximum duration that Flex Gateway waits for a response from an upstream service</p></td></tr><tr><td><p><strong>Category</strong></p></td><td><p>Quality of Service</p></td></tr><tr><td><p><strong>First Flex Gateway version available</strong></p></td><td><p>v1.9.0</p></td></tr><tr><td><p><strong>Returned Status Codes</strong></p></td><td><p>504 - Upstream request timeout</p></td></tr></tbody></table>

## Summary

The Response Timeout policy enables you to set the maximum duration that Flex Gateway waits for a
response from an upstream service. The timeout time starts at the last request sent by Flex Gateway.

By default, all Flex Gateway API instances have a response timeout of 15 seconds. Apply the policy
to override the default timeout.

## Configuring Policy Parameters

### Flex Gateway Local Mode

When you apply the policy via declarative configuration files, Refer to the following policy
definition and table of parameters:

\- policyRef: name: response-timeout-flex config: timeout: number // REQUIRED

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Required or Optional</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><code>timeout</code></p></div></div></td><td><div><div><p>Required</p></div></div></td><td><div><div><p>15</p></div></div></td><td><div><div><p>Time in seconds Flex Gateway waits for the response.</p></div></div></td></tr></tbody></table>

#### Resource Configuration Example

\- policyRef: name: response-timeout-flex config: timeout: 3

### Managed Flex Gateway and Flex Gateway Connected Mode

When you apply the policy from the UI, the following parameters are displayed:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Element</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><div><div><p>Response timeout</p></div></div></td><td><div><div><p>Time in seconds Flex Gateway waits for the response.</p></div></div></td><td><div><div><p>Yes</p></div></div></td></tr></tbody></table>
