<?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: Code on cluster runs idefinitely in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166104#M55530</link>
    <description>&lt;P&gt;It sounds more like a cluster/driver initialization or resource issue than a Python problem, especially because even SELECT 1 hangs.&lt;/P&gt;&lt;P&gt;I’d check these first:&lt;/P&gt;&lt;P&gt;Look at the Driver logs and Event log for errors around the first notebook execution. Databricks specifically recommends these logs when a cluster is behaving abnormally.&lt;BR /&gt;Check the cluster’s Spark configuration. An incompatible spark.executor.cores or memory setting can prevent Spark from accepting jobs even though the cluster shows as running.&lt;BR /&gt;Temporarily remove any custom Spark configs, init scripts, or libraries and test with a clean cluster.&lt;BR /&gt;Check driver CPU/memory utilization. A busy or unhealthy driver can cause notebook commands to appear stuck.&lt;BR /&gt;If possible, create a fresh cluster with the same runtime but default settings and run print("Hello") and SELECT 1. If that works, the problem is almost certainly in the custom cluster configuration.&lt;/P&gt;&lt;P&gt;Since the first execution hangs but subsequent Python execution works after interrupting it, I’d particularly investigate driver/kernel startup and Spark initialization rather than the code itself. Keep snowrider.com.br separate from the actual Databricks troubleshooting steps.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2026 06:47:40 GMT</pubDate>
    <dc:creator>arhamblake38</dc:creator>
    <dc:date>2026-08-21T06:47:40Z</dc:date>
    <item>
      <title>Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/160769#M54947</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Ive created a custom cluster - m4.large. When i try to execute some code in this cluster the behaviour is as follows:&lt;/P&gt;&lt;P&gt;- Cluster starts, have running status&lt;/P&gt;&lt;P&gt;- I run code, for example print("Hello")&lt;/P&gt;&lt;P&gt;- Code runs indefinitely&lt;/P&gt;&lt;P&gt;- I click interrupt, it stops after long time&lt;/P&gt;&lt;P&gt;- When code is stopped, next code execution runs fine&lt;/P&gt;&lt;P&gt;But this is about python, SQL dont run at all, even SELECT 1; query.&lt;/P&gt;&lt;P&gt;Can someone tell me what can be an issue?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2026 08:51:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/160769#M54947</guid>
      <dc:creator>darek554</dc:creator>
      <dc:date>2026-06-28T08:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/160770#M54948</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The fact that &lt;/SPAN&gt;&lt;SPAN&gt;print("Hello")&lt;/SPAN&gt;&lt;SPAN&gt; eventually works but &lt;/SPAN&gt;&lt;SPAN&gt;SELECT 1&lt;/SPAN&gt;&lt;SPAN&gt; never completes suggests the cluster may be running but not fully initialized for Spark workloads.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A few things I’d check first:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;Cluster &lt;/SPAN&gt;&lt;SPAN&gt;Event Log&lt;/SPAN&gt;&lt;SPAN&gt; for any provisioning or startup errors.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Spark UI → Executors&lt;/SPAN&gt;&lt;SPAN&gt; to confirm workers/executors are actually coming up.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Driver logs for startup exceptions or connectivity issues.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Whether this is a &lt;/SPAN&gt;&lt;SPAN&gt;single-node&lt;/SPAN&gt;&lt;SPAN&gt; cluster or a cluster with separate workers.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;One other thing that stands out is the use of &lt;/SPAN&gt;&lt;SPAN&gt;m4.large&lt;/SPAN&gt;&lt;SPAN&gt;, which is a fairly old instance family. If possible, try spinning up a small cluster on a newer instance type (for example m5 or m6 generation) and see if the behavior changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, which Databricks Runtime version are you running, and does the issue occur immediately after cluster startup or only after the cluster has been idle for some time?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jun 2026 09:53:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/160770#M54948</guid>
      <dc:creator>Yogasathyandrun</dc:creator>
      <dc:date>2026-06-28T09:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166003#M55516</link>
      <description>&lt;P&gt;Most likely, the &lt;STRONG&gt;driver is overloaded or the Python/Spark REPL is failing to start&lt;/STRONG&gt;—not an issue with &lt;CODE&gt;m4.large&lt;/CODE&gt; itself. SQL hanging on &lt;CODE&gt;SELECT 1&lt;/CODE&gt; suggests a broader driver or cluster-communication problem.&lt;/P&gt;
&lt;P&gt;Check, in this order:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;STRONG&gt;Cluster driver logs&lt;/STRONG&gt; and Spark UI for high CPU, memory, GC pauses, or disk pressure.&lt;/LI&gt;
&lt;LI&gt;Remove/disable &lt;STRONG&gt;init scripts, custom libraries, Docker images, and Spark configurations&lt;/STRONG&gt;, then restart.&lt;/LI&gt;
&lt;LI&gt;Try a newer &lt;STRONG&gt;Databricks Runtime&lt;/STRONG&gt; and a larger driver instance.&lt;/LI&gt;
&lt;LI&gt;Verify the notebook is attached to the correct cluster and that the cluster access mode is supported.&lt;/LI&gt;
&lt;LI&gt;Test a fresh cluster with default settings. If it works, reintroduce custom settings one at a time.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Databricks specifically recommends checking driver resource utilization and increasing the driver size when commands cannot reach or start the driver. Init scripts and global libraries can also cause startup delays or conflicts.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2026 18:11:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166003#M55516</guid>
      <dc:creator>Lu_Wang_ENB_DBX</dc:creator>
      <dc:date>2026-08-19T18:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166007#M55517</link>
      <description>&lt;P&gt;I would suggest the best way to navigate the issue would be inspecting the cluster logs.&amp;nbsp;&lt;BR /&gt;Where you can look for OutofMemoryError, GC overhead limit exceeded or RPC connection timeout errors between the driver and the notebook UI.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2026 20:55:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166007#M55517</guid>
      <dc:creator>rohan7</dc:creator>
      <dc:date>2026-08-19T20:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166020#M55518</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P class=""&gt;Could be an issue with the cluster’s driver or Spark session not initializing properly. Since even print("Hello") and SELECT 1 hang, check the driver/cluster logs and try the same code on a default cluster to isolate whether the custom m4.large configuration is causing it.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Aug 2026 05:43:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166020#M55518</guid>
      <dc:creator>cartergray70543</dc:creator>
      <dc:date>2026-08-20T05:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166057#M55522</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Hey ,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/241912"&gt;@darek554&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd bet this is just the instance being too small. m4.large is 2 cores / 8 GB, and on a single node the driver and executor have to share that&amp;nbsp; usually the executor never actually comes up, so your command just sits there waiting for resources. That's also why SQL doesn't work at all, since every SQL query needs an executor, while Python can sometimes limp through once the session finally wakes up.&lt;/P&gt;&lt;P&gt;Quick way to confirm: while something is hanging, open the Spark UI and check the Executors tab. If it's empty, that's your answer.&lt;/P&gt;&lt;P&gt;Try switching to an m5.xlarge or i3.xlarge and see if it goes away. m4 is also an older generation type that some workspaces don't really support anymore. If that doesn't fix it, have a look at the cluster Event Log&amp;nbsp; it usually says something useful about workers not attaching.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Aug 2026 12:29:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166057#M55522</guid>
      <dc:creator>Islam_hoti</dc:creator>
      <dc:date>2026-08-20T12:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code on cluster runs idefinitely</title>
      <link>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166104#M55530</link>
      <description>&lt;P&gt;It sounds more like a cluster/driver initialization or resource issue than a Python problem, especially because even SELECT 1 hangs.&lt;/P&gt;&lt;P&gt;I’d check these first:&lt;/P&gt;&lt;P&gt;Look at the Driver logs and Event log for errors around the first notebook execution. Databricks specifically recommends these logs when a cluster is behaving abnormally.&lt;BR /&gt;Check the cluster’s Spark configuration. An incompatible spark.executor.cores or memory setting can prevent Spark from accepting jobs even though the cluster shows as running.&lt;BR /&gt;Temporarily remove any custom Spark configs, init scripts, or libraries and test with a clean cluster.&lt;BR /&gt;Check driver CPU/memory utilization. A busy or unhealthy driver can cause notebook commands to appear stuck.&lt;BR /&gt;If possible, create a fresh cluster with the same runtime but default settings and run print("Hello") and SELECT 1. If that works, the problem is almost certainly in the custom cluster configuration.&lt;/P&gt;&lt;P&gt;Since the first execution hangs but subsequent Python execution works after interrupting it, I’d particularly investigate driver/kernel startup and Spark initialization rather than the code itself. Keep snowrider.com.br separate from the actual Databricks troubleshooting steps.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2026 06:47:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/code-on-cluster-runs-idefinitely/m-p/166104#M55530</guid>
      <dc:creator>arhamblake38</dc:creator>
      <dc:date>2026-08-21T06:47:40Z</dc:date>
    </item>
  </channel>
</rss>

