A Snowflake connection timeout occurs when the client cannot establish or maintain a session within the allotted time; adjust driver parameters and network settings to prevent it.
A timeout signals that the client failed to connect to Snowflake, or the session went idle longer than the driver allows. The fix is to increase timeout parameters or keep the session active.
Key options are login_timeout
(initial handshake), network_timeout
(query wait), and CLIENT_SESSION_KEEP_ALIVE
(keeps idle sessions alive).Configure them in the connection string or driver-specific method.
Pass login_timeout=<seconds>
and network_timeout=<seconds>
to snowflake.connector.connect()
. Enable CLIENT_SESSION_KEEP_ALIVE=True
to keep the session alive during long analysis.
Add loginTimeout
and networkTimeout
in the JDBC URL, or set them in the ODBC DSN.Always align values with corporate firewall idle limits.
Long-running jobs often timeout because no query executes for several minutes. Schedule periodic SELECT 1
heartbeats or enable keep-alive to keep the connection open.
Use generous but bounded timeout values (30–120 s for login, 300–900 s for network), enable keep-alive on idle jobs, and monitor network latency.Close connections after work to free resources.
SELECT 1;
every 5 minutes prevents idle disconnects during long transformations.
.
Keeping a session alive does not keep the virtual warehouse running, so compute costs stay unchanged. Only active queries consume credits.
Snowflake drivers usually default to 10 seconds. High-latency networks may need 30–60 seconds.
No. Timeouts are client-side settings; modify them per connection string or driver configuration.