<?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: (Big) Problem with SQL Warehouse Auto stop in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114801#M1987</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/118401"&gt;@leo-machado&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132493"&gt;@pdiamond&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Thanks for sharing the details and your workaround.&lt;BR /&gt;I understand the seriousness of the issue and will reach out to the relevant team internally. I’ll follow up on this thread as soon as I have an update. Appreciate your patience in the meantime!&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 08:51:32 GMT</pubDate>
    <dc:creator>Advika</dc:creator>
    <dc:date>2025-04-08T08:51:32Z</dc:date>
    <item>
      <title>(Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103949#M1780</link>
      <description>&lt;P&gt;Long story short, I'm not sure if this is an already known problem, but the Auto Stop feature on SQL Warehouses after&amp;nbsp;&lt;SPAN&gt;minutes of inactivity is not working properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;We started using SQL Warehouses more aggressively this December when we scaled up one of our operations (this process uses a GoLang connector) and noticed it was getting pretty expensive.&lt;/P&gt;&lt;P&gt;After some investigation, we found this behavior:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image (2).png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13822i15751602E3D43B99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image (2).png" alt="image (2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Even though queries were finishing running and there was no activity in the cluster, the cluster down did not go down, as if it was still running.&lt;/P&gt;&lt;P&gt;To make sure it was not a problem with the visualization, I've checked warehouse events on the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;system.compute.warehouse_events&lt;/STRONG&gt; table, and it was, in fact, not turning the warehouse off.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In one particular example, this is the log for the warehouse:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STARTING 0 2024-12-25T03:02:46.198+00:00&lt;BR /&gt;STOPPING 1 2024-12-25T04:07:09.253+00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And these were the only queries executed during that period (start time and end time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2024-12-25T03:15:44.147+00:00 2024-12-25T03:15:49.266+00:00&lt;BR /&gt;2024-12-25T03:56:27.947+00:00 2024-12-25T03:56:28.063+00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This warehouse is configured to auto-stop after 1 minute of inactivity, which did NOT happen. In order to test the cost impact of this, I've designed a quick code using Serverless and AWS Lambda to force warehouse stopping when there are not queries running/queued.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These are the results in terms of warehouse costs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-01-02 at 10.31.27.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13824iA8FCDD4CDB08608B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-01-02 at 10.31.27.png" alt="Screenshot 2025-01-02 at 10.31.27.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically a drop from $40/day to $10/day less.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm not sure what is causing the warehouse to stay "on", but I'm guessing it is interpreting JDBC connections as "active sessions" even though they're not running any queries - anyway, this is a serious problem in my opinion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For those of you that want to copy the approach, the code can be found here:&amp;nbsp;&lt;A href="https://github.com/lmachado-sousa/databricks-sql-warehouse-terminator" target="_blank"&gt;https://github.com/lmachado-sousa/databricks-sql-warehouse-terminator&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 14:18:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103949#M1780</guid>
      <dc:creator>leo-machado</dc:creator>
      <dc:date>2025-01-02T14:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103959#M1781</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/118401"&gt;@leo-machado&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This problem likely happen because of active sessions on the JDBC connection to the warehouse as you pointed out.&lt;/P&gt;
&lt;P&gt;This kind of issues required more investigations, could you please share your warehouseID and your workspaceID on a DIM message I can check our backend logs to understand the behavior.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 15:00:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103959#M1781</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-01-02T15:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103963#M1782</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106294"&gt;@Alberto_Umana&lt;/a&gt;,&amp;nbsp;I've sent you the IDs as requested in a direct message&lt;/P&gt;&lt;P&gt;To point out, we did investigate the active connection hypothesis and made sure our code was always closing the connection - our jobs take 10 min at most to finish as well - the problem continued even after making this check.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 15:12:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103963#M1782</guid>
      <dc:creator>leo-machado</dc:creator>
      <dc:date>2025-01-02T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103968#M1783</link>
      <description>&lt;P&gt;Thanks Leo, I received the details, I will review it once I have some time and get back!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, currently behavior it's not happening because you implemented the custom logic, right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 15:20:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103968#M1783</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-01-02T15:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103981#M1784</link>
      <description>&lt;P&gt;Correct, the lambda terminator solved the problem in the short term&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 16:32:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/103981#M1784</guid>
      <dc:creator>leo-machado</dc:creator>
      <dc:date>2025-01-02T16:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/106530#M1827</link>
      <description>&lt;P&gt;Is this still being investigated by Databricks? I'm seeing similar behavior that's costing us a lot of money.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 17:45:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/106530#M1827</guid>
      <dc:creator>pdiamond</dc:creator>
      <dc:date>2025-01-21T17:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114738#M1982</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132493"&gt;@pdiamond&lt;/a&gt;&amp;nbsp;as of today, no one has returned on this topic and I'm still using the lambda terminator to make sure the clusters are terminated when no query is running - the issue is still present.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 17:38:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114738#M1982</guid>
      <dc:creator>leo-machado</dc:creator>
      <dc:date>2025-04-07T17:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114801#M1987</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/118401"&gt;@leo-machado&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132493"&gt;@pdiamond&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Thanks for sharing the details and your workaround.&lt;BR /&gt;I understand the seriousness of the issue and will reach out to the relevant team internally. I’ll follow up on this thread as soon as I have an update. Appreciate your patience in the meantime!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 08:51:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114801#M1987</guid>
      <dc:creator>Advika</dc:creator>
      <dc:date>2025-04-08T08:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114818#M1988</link>
      <description>&lt;P&gt;One thing we noticed is that the "Monitoring" tab of the SQL Warehouse page can be misleading because it doesn't always account for time spent fetching &amp;amp; serving the data to the client, only the actual query execution time. This was confirmed by Support and they also said enhancments to the Monitoring page were being developed to address it.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 11:39:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114818#M1988</guid>
      <dc:creator>pdiamond</dc:creator>
      <dc:date>2025-04-08T11:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114823#M1989</link>
      <description>&lt;P&gt;Makes sense! The go connector paginates the results and it takes a while longer to fetch everything - we did stop using pagination and started using the INSERT OVERWRITE DIRECTORY statement and got better cost efficient results.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 12:22:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/114823#M1989</guid>
      <dc:creator>leo-machado</dc:creator>
      <dc:date>2025-04-08T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: (Big) Problem with SQL Warehouse Auto stop</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/133318#M2271</link>
      <description>&lt;P&gt;This is a good catch. Auto termination is something you tend to set and trust it will do the right thing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; .&lt;/P&gt;&lt;P&gt;Wondering if the Databricks team managed to fix this, seeing it has been half a year since the problem was raised.&lt;/P&gt;&lt;P&gt;This is also important for our cost control, so Im interested.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 06:50:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/big-problem-with-sql-warehouse-auto-stop/m-p/133318#M2271</guid>
      <dc:creator>HNguyen</dc:creator>
      <dc:date>2025-09-30T06:50:38Z</dc:date>
    </item>
  </channel>
</rss>

