Getting started Community Training Tutorials Documentation APIs, AI & Tools
Configure Omni Gateway Environment Variables in Connected Mode
Omni Gateway provides these environment variables to configure your gateway:
| Variable Name | Default Value | Description |
|---|---|---|
FLEX_CONNECTION_IDLE_TIMEOUT_SECONDS |
|
Maximum number of seconds a connection can be idle before it times out. For more information, see Configuring Timeouts in Connected Mode. |
FLEX_STREAM_IDLE_TIMEOUT_SECONDS |
|
Maximum number of seconds a stream can remain idle without receiving any data in either the inbound (client to Omni Gateway) or outbound (Omni Gateway to upstream service) direction. For more information, see Configuring Timeouts in Connected Mode. |
FLEX_UPSTREAM_CONNECTION_IDLE_TIMEOUT_SECONDS |
|
Maximum number of seconds a stream between Omni Gateway and the upstream service can remain idle between requests. For more information, see Configuring Timeouts in Connected Mode. |
FLEX_UPSTREAM_RESPONSE_TIMEOUT_SECONDS |
|
Maximum number of seconds an Omni Gateway waits for a response from an upstream service. For more information, see Configuring Timeouts in Connected Mode. |
FLEX_ENVOY_HEADERS_ENABLED |
|
Allows ( |
FLEX_REWRITE_HOST_HEADER |
|
Rewrite HTTP Host header to match upstream. |
FLEX_REMOVE_SERVER_HEADER |
|
Removes the |
FLEX_HEADER_RAW_VALUE_ENABLE |
`tru`e |
Controls header encoding for external authorization. Set to |
FLEX_FORWARD_CLIENT_CERT_DETAILS |
|
Controls how the |
FLEX_DOWNSTREAM_CONNECTION_BUFFER_LIMIT_BYTES |
|
Maximum size, in bytes, of read and write buffers for new connections. For more information, see Requirements and Limits for Omni Gateway. |
FLEX_DATASOURCE_CONTROL_NODE_ENABLED |
|
Enable configuration caching in Redis shared storage for Connected Mode replicas. This variable is enabled by default. To disable configuration caching, set this variable to |
FLEX_SERVICE_ENVOY_DRAIN_TIME |
|
Drain period in seconds during shutdown before Omni Gateway exits gracefully. For more information, see Monitoring in Connected Mode. |
FLEX_SYNC_DEBOUNCE_TIME |
"5s" |
Specifies the amount of time to wait after detecting a configuration change before applying it. This prevents excessive reloading during rapid successive changes. The value must be a valid duration string, such as |
FLEX_DNS_REFRESH_RATE |
|
Sets how often Omni Gateway refreshes DNS for upstream service clusters. The value is a duration string that is clamped between |
FLEX_LOG_LEVEL |
|
Sets the logging level for Omni Gateway. For the environment variable configuration of log level, you specify a number that corresponds to the log level. Supported values are NONE:`-1`, FATAL:`0`, ERROR:`1`, WARN:`2`, INFO:`4`, DEBUG:`8`, and TRACE:`16`. |
FLEX_CONFIG |
N/A |
Provides Omni Gateway registration and configuration as a YAML-formatted string. The YAML content must be properly escaped to preserve special characters. Provide your registration and configuration as a string if deploying environments where file mounting isn’t practical, such as Amazon ECS or Azure Container Apps. |
Configure Global and Routing Settings in Runtime Manager
Configure these variables from Runtime Manager:
-
Global connection buffer limit (
FLEX_DOWNSTREAM_CONNECTION_BUFFER_LIMIT_BYTES) -
Rewrite Host Header (
FLEX_REWRITE_HOST_HEADER)
If you configure a setting in both places, the Runtime Manager value takes precedence over the environment variable.
To configure these settings in Runtime Manager:
-
In Anypoint Platform, select Runtime Manager.
-
Select Omni Gateways, and then select your gateway.
-
Open Runtime Configurations.
-
Edit the variables and apply your changes.
Environment Variable Synchronization
Runtime Manager runtime configurations and environment variables don’t synchronize in either direction:
-
Omni Gateway reads
FLEX_*environment variables only when the pod starts, and uses them to set the initial value. Applying a change in Runtime Manager doesn’t update the environment variable, so commands such askubectl exec <pod> — envcontinue to show the original value after a successful change. -
Changing an environment variable on the pod isn’t reflected in Runtime Manager.
To verify the effective value, don’t check the pod environment. Instead, run flexctl dump and open resources/Configuration.json in the extracted ZIP file.
If the setting is present, that value is in effect. If the setting is absent, the environment variable value or built-in default applies. For more information, see Troubleshooting with the CLI.



