metricsign
Start free
Medium severityconnectionSnowflake

Power BI Refresh Error:
JDBC 8

What does this error mean?

The JDBC connection was dropped mid-session with a 'broken pipe' error. This typically happens when an intermediate network appliance (proxy, load balancer, NAT gateway) closes idle or long-lived connections before the Snowflake session ends.

Common causes

  • 1A proxy or NAT gateway has an idle connection timeout shorter than the Snowflake session duration
  • 2A long-running query caused the TCP connection to appear idle during execution, triggering proxy timeout
  • 3AWS NAT Gateway idle timeout (350 seconds by default) killing connections during result streaming
  • 4Corporate firewall closing connections idle for more than a configured threshold
  • 5The JDBC keep-alive is not configured, allowing the TCP connection to go stale

How to fix it

  1. 1Enable TCP keep-alive at the OS level to prevent idle timeouts from killing active connections.
  2. 2Set a shorter Snowflake statement timeout to avoid long-running queries that appear idle: ALTER SESSION SET STATEMENT_TIMEOUT_IN_SECONDS = 600.
  3. 3Increase the proxy or NAT idle timeout to be longer than the maximum expected query duration.
  4. 4Use connection pooling with keepAlive settings enabled.
  5. 5Add &networkTimeout=<ms> to the JDBC URL to configure socket-level timeout handling.

Frequently asked questions

How do I enable TCP keep-alive for Snowflake JDBC?

Set the JVM system property -Djava.net.preferIPv4Stack=true and configure OS-level TCP keep-alive (net.ipv4.tcp_keepalive_time on Linux). The JDBC driver itself does not have a built-in keep-alive setting.

Does Snowflake have a session idle timeout that could cause this?

Yes — the default session idle timeout is controlled by SESSION_POLICY. However, broken pipe errors are almost always caused by intermediate network appliances timing out before Snowflake does.

Official documentation: https://docs.snowflake.com/en/user-guide/client-connectivity-troubleshooting/error-messages

Other connection errors