---
schema_version: "1"
id: 3ce6249c4b641fa9d88c9598ef77d48dbd4927ecd51769be48146db3660e4beb
title: Configure Timeouts for Managed Flex Gateway
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/flex-managed-timeout.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/flex-managed-timeout
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 64ea1129e1d4094d1749de518d4cb94536ea318b53a81a0cca6db32e1041c245
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
---
product: Omni Gateway
version: 1.12
---

# Configure Timeouts for Managed Flex Gateway

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

Flex Gateway offers these timeouts to improve service quality and reduce computing resource waste:

- **Stream Idle Timeout**  
  The Stream Idle Timeout enables you to set a maximum amount of a time a stream can remain idle
  without receiving any data in either the inbound (client to Flex Gateway) or outbound (Flex
  Gateway to upstream service) direction.

  By default, all Flex Gateway API instances have a stream timeout of 300 seconds.

- **Upstream Idle Timeout**  
  The Upstream Idle Timeout enables you to set a maximum amount of time a stream between Flex
  Gateway and the upstream service can remain idle between requests.

  By default, all Flex Gateway API instances have an upstream idle timeout of 60 seconds.

- **Response Timeout**  
  The Response Timeout enables you to set a maximum amount of a time 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.

You can configure these timeouts for Managed Flex Gateway via:

- Managed Flex Gateway deployment: Set initial timeout values when you create the gateway.

- Runtime Manager runtime configurations: Applies to all API instances in the gateway after the
  gateway is deployed.

- Policy: Applies to one API instance or upstream and provides granular control.

## Configure Timeouts During Managed Gateway Deployment

Set timeout values in the deployment flow when you create a Managed Flex Gateway. For the UI steps
and parameter descriptions, see [Deploy a Managed Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-gateway-managed-set-up).

## Configure Timeouts in Runtime Manager

1.  In Anypoint Platform, select **Runtime Manager**.

2.  Select **Flex Gateways**.

3.  Select your Flex Gateway.

4.  Open **Runtime Configurations**.

5.  Open **Timeouts**.

6.  Set values for **Stream Idle Timeout**, **Upstream Connection Idle Timeout**, and **Upstream
    Response Timeout**.

7.  Apply the changes.

## Configure Timeouts via Policies

Apply these policies to your API instance or upstream service:

- [Stream Idle Timeout Policy](https://docs.mulesoft.com/gateway/1.12/policies-included-stream-idle-timeout)

- [Upstream Idle Timeout Policy](https://docs.mulesoft.com/gateway/1.12/policies-outbound-upstream-idle-timeout)

- [Response Timeout Policy](https://docs.mulesoft.com/gateway/1.12/policies-included-response-timeout)
