From 595785b92ccbd1cc4202a9fa06af7142ee94a1b5 Mon Sep 17 00:00:00 2001
From: Jacob Joseph <likeshumidity@users.noreply.github.com>
Date: Thu, 18 Jan 2024 15:47:56 -0500
Subject: [PATCH] Update environment-variables.md (#36231)

Added  MB_JDBC_DATA_WAREHOUSE_UNRETURNED_CONNECTION_TIMEOUT_SECONDS to docs
---
 docs/configuring-metabase/environment-variables.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/configuring-metabase/environment-variables.md b/docs/configuring-metabase/environment-variables.md
index 043beb0c73e..31c5fc1b9d9 100644
--- a/docs/configuring-metabase/environment-variables.md
+++ b/docs/configuring-metabase/environment-variables.md
@@ -552,6 +552,18 @@ Change this to a higher value if you notice that regular usage consumes all or c
 
 See [MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE](#mb_application_db_max_connection_pool_size) for setting maximum connections to the Metabase application database.
 
+### `MB_JDBC_DATA_WAREHOUSE_UNRETURNED_CONNECTION_TIMEOUT_SECONDS`
+
+Type: integer<br>
+Default: `1200`<br>
+Since: v47.4
+
+Metabase's query processor will normally kill connections when their queries time out, but in practice some connections can be severed and go undetected by Metabase, staying alive even after a query returns or times out. This environment variable tells  Metabase how long to wait before killing connections if no response is received from the connection.
+
+This variable affects connection that are severed and undetected by Metabase (i.e. Metabase never receives connection closed signal and is treating an inactive connection as active). It is most often adjusted when connecting to unreliable or dynamic connections that are behind a SSH tunnel where the connection to the SSH tunnel host may stay active even after the connection from the SSH tunnel host to the Database is severed.
+
+If left blank, the default production value for `metabase.query-processor.query-timeout-ms` is used which is 1,200,000 ms (i.e. 1,200 seconds or 20 minutes).
+
 ### `MB_JETTY_ASYNC_RESPONSE_TIMEOUT`
 
 Type: integer<br>
-- 
GitLab