<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Databricks JDBC driver fails with socket read timeout in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/97436#M1667</link>
    <description>&lt;P&gt;Did you tried to increase the socket timeout?&lt;/P&gt;</description>
    <pubDate>Sun, 03 Nov 2024 22:09:18 GMT</pubDate>
    <dc:creator>Rafael-Sousa</dc:creator>
    <dc:date>2024-11-03T22:09:18Z</dc:date>
    <item>
      <title>Databricks JDBC driver fails with socket read timeout</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/91745#M1576</link>
      <description>&lt;P&gt;We work with a application that connects to our Databricks serverless SQL warehouse via Databricks JDBC driver. It runs a few thousand SQL select statements everyday, and a small percentage of them will fail with the following error details:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;java.sql.SQLException: [Databricks][JDBCDriver](500157) Socket timeout expired when executing query: SELECT COA***.; caused by com.databricks.client.support.exceptions.GeneralException: [Databricks][JDBCDriver](500157) Socket timeout expired when executing query: SELECT COA***.; caused by com.databricks.client.jdbc42.internal.apache.thrift.transport.TTransportException: java.net.SocketTimeoutException: Read timed out; caused by java.net.SocketTimeoutException: Read timed out&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A full stack trace can be provided upon request.&lt;/P&gt;&lt;P&gt;On the SQL warehouse side the failed queries are showing this as the error:&amp;nbsp;&lt;STRONG&gt;Query has been timed out due to inactivity.&lt;/STRONG&gt;, and upon reviewing the query profile the biggest standout metric is the&amp;nbsp;&lt;STRONG&gt;Result fetching by client&lt;/STRONG&gt; metric. That metric ranges from 6-20 minutes on those failed queries, which is dramatically longer compared to the usual fetching time of around ~225ms on successful ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Observations around failed statements:&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;The statements fail typically after 10 seconds but there were several failures also after 15 or 16 seconds.&lt;/LI&gt;&lt;LI&gt;Execution never gets into fetching phase.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Failed statements continue execution on server side. Statements fail on server-side eventually, but it takes even 10 minutes or more. That time is reported as fetching time.&lt;/LI&gt;&lt;LI&gt;When the failed statement is executed from sql console, it pass and data are fetched quickly as most of the queries returns low number of records.&lt;/LI&gt;&lt;LI&gt;Failures happen during high load. serverless SQL warehouse is on its maximal configuration, i.e. no scale down or up during failures. If the HW is switched to more powerful nodes, it has no effect.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;JDBC driver configuration:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Driver version&amp;nbsp;2.6.38, happens also with&amp;nbsp;2.6.36&lt;/LI&gt;&lt;LI&gt;Authentication by PAT&lt;/LI&gt;&lt;LI&gt;SocketTimeOut either 0 or 300, happens for both values&lt;/LI&gt;&lt;LI&gt;Preset catalog and schema&lt;/LI&gt;&lt;LI&gt;Connection initialized with "SET ansi_mode = false"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Connection pool settings:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;HikariCP version&amp;nbsp;5.1.0&lt;/LI&gt;&lt;LI&gt;Maximally 30 parallel connections to the SQL warehouse&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We're looking for any advice on how to mitigate the failures.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:36:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/91745#M1576</guid>
      <dc:creator>Kyle2</dc:creator>
      <dc:date>2024-09-25T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks JDBC driver fails with socket read timeout</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/97436#M1667</link>
      <description>&lt;P&gt;Did you tried to increase the socket timeout?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2024 22:09:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/97436#M1667</guid>
      <dc:creator>Rafael-Sousa</dc:creator>
      <dc:date>2024-11-03T22:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks JDBC driver fails with socket read timeout</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/98195#M1682</link>
      <description>&lt;P&gt;Yeah :/, the SocketTimeOut has been toyed with, no value that has been tried has made any difference.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 15:31:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/98195#M1682</guid>
      <dc:creator>Kyle2</dc:creator>
      <dc:date>2024-11-08T15:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks JDBC driver fails with socket read timeout</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/115783#M2023</link>
      <description>&lt;P&gt;Did you ever find a solution? Hitting the same thing. Thinking we get a SocketTimeout on some initial request to see if the server can take a new request. If there are no threads to respond&amp;nbsp; (server is busy with other queries) we get a timeout.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 17:49:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/databricks-jdbc-driver-fails-with-socket-read-timeout/m-p/115783#M2023</guid>
      <dc:creator>banghartt</dc:creator>
      <dc:date>2025-04-17T17:49:15Z</dc:date>
    </item>
  </channel>
</rss>

