<?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: Fatal error: Python kernel is unresponsive in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32497#M23691</link>
    <description>&lt;P&gt;Hey @Cheuk Hin Christophe Poon​&amp;nbsp;, I don't know if you managed to solve this issue.&lt;/P&gt;&lt;P&gt;I saw in Databricks blog that this error is caused by out of RAM issue, &lt;A href="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" alt="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" target="_blank"&gt;link here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides, When i tried to run my notebook from a job, not just that the run&amp;nbsp;finished without any errors but also the RAM that was being used cut down by half - maybe you should give it a try if didn't managed yet.&lt;/P&gt;&lt;P&gt;I think that when you run the code inside the notebook a lot of state is saved any fill up the RAM ( It's just a feeling I didn't confirm that).&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2022 17:27:52 GMT</pubDate>
    <dc:creator>Orianh</dc:creator>
    <dc:date>2022-10-25T17:27:52Z</dc:date>
    <item>
      <title>Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32485#M23679</link>
      <description>&lt;P&gt;Hey guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using petastorm to train DNN, First i convert spark df with make_spark_convertor  and then open a reader on the materialized dataset.&lt;/P&gt;&lt;P&gt;While i start training session only on subset of the data every thing works fine but when I'm using all dataset after about 500 batches my notebook crash with Python kernel is unresponsive, any of you know what this happening?&lt;/P&gt;&lt;P&gt;I saw kinda similar question already and i looked on thread dumps but didn't understood it to much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides i get alot of future warning from petastorm about pyarrow, have any idea how to avoid all this warnings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 08:03:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32485#M23679</guid>
      <dc:creator>Orianh</dc:creator>
      <dc:date>2022-09-07T08:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32486#M23680</link>
      <description>&lt;P&gt;Same error. This started a few days ago on notebooks that used to run fine in the past. Now, I cannot finish a notebook.&lt;/P&gt;&lt;P&gt;I have already disabled almost all output being streamed to the result buffer, but the problem persists. I am left with &amp;lt;50 lines being logged/printed. If Databricks cannot handle such a minimal amount of output, it's not a usable solution.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 07:14:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32486#M23680</guid>
      <dc:creator>230134</dc:creator>
      <dc:date>2022-09-08T07:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32487#M23681</link>
      <description>&lt;P&gt;In my case, this turned out to be a memory issue. For whatever reason, Databricks doesn't properly raise a MemoryError. So you're kind of left hanging and have to figure it out yourself.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 14:13:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32487#M23681</guid>
      <dc:creator>230134</dc:creator>
      <dc:date>2022-09-08T14:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32488#M23682</link>
      <description>&lt;P&gt;Thanks for sharing your findings. How did you determine this was a `MemoryError`?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:19:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32488#M23682</guid>
      <dc:creator>susodapop</dc:creator>
      <dc:date>2022-09-09T15:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32489#M23683</link>
      <description>&lt;P&gt;I opened the terminal to the cluster and just monitored htop. I could see memory usage going up, hitting the limit, going into swap, and then dropping to a base level at the same time as the FatalError was raised.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 15:39:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32489#M23683</guid>
      <dc:creator>230134</dc:creator>
      <dc:date>2022-09-09T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32490#M23684</link>
      <description>&lt;P&gt;I also noticed the same behavior. How can we handle such a problem in your opinion? It would take something to manage the RAM...&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 13:20:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32490#M23684</guid>
      <dc:creator>ilvacca</dc:creator>
      <dc:date>2022-09-13T13:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32491#M23685</link>
      <description>&lt;P&gt;Hey Guys, &lt;/P&gt;&lt;P&gt;While i was training i noticed two things that might cause the error.&lt;/P&gt;&lt;P&gt;The first one is after a training session was crashed, the GPU memory was almost full ( checked with nvidia smi command).&lt;/P&gt;&lt;P&gt;The second one is that i saw in gangila metrics a Swap above the total memory of the cluster.&lt;/P&gt;&lt;P&gt;In my use case i use make_reader from petastorm to read petastorm dataset and its default workers_count is 10, While i changed workers_count to 4  I didn't got any error.&lt;/P&gt;&lt;P&gt;I didn't figure out if I'm truly right and what the right way to overcome this,&lt;/P&gt;&lt;P&gt;Would  like to hear you opnion,&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:46:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32491#M23685</guid>
      <dc:creator>Orianh</dc:creator>
      <dc:date>2022-09-14T09:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32492#M23686</link>
      <description>&lt;P&gt;In my case I use a simple notebook with an OpenCV processing. The code is not yet optimized to run on a cluster (I use a Single Node for testing coupled with Synapse) however it seems absurd to me that the kernel crashes due to RAM filling up (I verified this via the cluster monitoring panel).&lt;/P&gt;&lt;P&gt;Do you think it is possible to define a "max RAM usage" per notebook somewhere?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:52:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32492#M23686</guid>
      <dc:creator>ilvacca</dc:creator>
      <dc:date>2022-09-14T09:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32493#M23687</link>
      <description>&lt;P&gt;Hi @orian hindi​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 06:04:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32493#M23687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-24T06:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32494#M23688</link>
      <description>&lt;P&gt;I also have the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before `&lt;B&gt;&lt;I&gt;&lt;U&gt;Fatal error: Python kernel is unresponsive&lt;/U&gt;`, &lt;/I&gt;&lt;/B&gt;the process &lt;B&gt;&lt;I&gt;`&lt;U&gt;Determining location of DBIO file fragments. This operation can take some time`&lt;/U&gt;&lt;/I&gt;&lt;/B&gt; took me 6.92 hours. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know whether this is normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Fatal Error"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1530i91293FB06B9C317A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fatal Error" alt="Fatal Error" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.databricks.com/s/profile/0058Y00000B2rdUQAR" alt="https://community.databricks.com/s/profile/0058Y00000B2rdUQAR" target="_blank"&gt;Vidula Khanna&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 08:58:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32494#M23688</guid>
      <dc:creator>Dicer</dc:creator>
      <dc:date>2022-10-05T08:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32495#M23689</link>
      <description>&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;While I was training I noticed two things that might cause the error.&lt;/P&gt;&lt;P&gt;The first one is after a training session was crashed, the GPU memory was almost full ( checked with Nvidia semi command).&lt;/P&gt;&lt;P&gt;The second one is that I saw in ganglia metrics a Swap above the total memory of&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 16:06:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32495#M23689</guid>
      <dc:creator>rubelahamed</dc:creator>
      <dc:date>2022-10-07T16:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32496#M23690</link>
      <description>&lt;P&gt;Hey @Alessio Vaccaro​&amp;nbsp;, Sorry for the really delayed response &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt; &lt;/P&gt;&lt;P&gt;I didn't find any documentation or any good resource of this.&lt;/P&gt;&lt;P&gt;I would hope that if only 1 notebook is attached to a cluster, this notebook can use all the RAM - memory allocated for spark driver, when more notebooks are attached then some mechanism to handle it start to work.&lt;/P&gt;&lt;P&gt;Actually i saw a databricks blog that say "Fatal error: The Python kernel is unresponsive." is an error cause because out of RAM &lt;/P&gt;&lt;P&gt;you can see the blog here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" alt="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" target="_blank"&gt;Accelerating Your Deep Learning with PyTorch Lightning on Databricks - The Databricks Blog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 17:17:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32496#M23690</guid>
      <dc:creator>Orianh</dc:creator>
      <dc:date>2022-10-25T17:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32497#M23691</link>
      <description>&lt;P&gt;Hey @Cheuk Hin Christophe Poon​&amp;nbsp;, I don't know if you managed to solve this issue.&lt;/P&gt;&lt;P&gt;I saw in Databricks blog that this error is caused by out of RAM issue, &lt;A href="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" alt="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" target="_blank"&gt;link here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides, When i tried to run my notebook from a job, not just that the run&amp;nbsp;finished without any errors but also the RAM that was being used cut down by half - maybe you should give it a try if didn't managed yet.&lt;/P&gt;&lt;P&gt;I think that when you run the code inside the notebook a lot of state is saved any fill up the RAM ( It's just a feeling I didn't confirm that).&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 17:27:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32497#M23691</guid>
      <dc:creator>Orianh</dc:creator>
      <dc:date>2022-10-25T17:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32498#M23692</link>
      <description>&lt;P&gt;Hey @Vidula Khanna​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a workaround, I created a job that run the notebook. ( with cluster spec and not with existing cluster - which cost cheaper)&lt;/P&gt;&lt;P&gt;I think when a notebook is attached to existing cluster a lot of state of it saved which fill the RAM or there is some mechanism that starts to work on allocating memory to this and any other notebook that might come , &lt;/P&gt;&lt;P&gt;When i run the notebook from a job, the memory being used was cut down by half and the run finished without any errors.&lt;/P&gt;&lt;P&gt;But for sure, this error is caused by out of RAM: &lt;A href="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" alt="https://www.databricks.com/blog/2022/09/07/accelerating-your-deep-learning-pytorch-lightning-databricks.html" target="_blank"&gt;link here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 17:39:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32498#M23692</guid>
      <dc:creator>Orianh</dc:creator>
      <dc:date>2022-10-25T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32499#M23693</link>
      <description>&lt;P&gt;@orian hindi​&amp;nbsp;I also think the problem is insufficient RAM. But I already deployed 6-8&lt;A href="https://learn.microsoft.com/en-us/azure/virtual-machines/ncv3-series" alt="https://learn.microsoft.com/en-us/azure/virtual-machines/ncv3-series" target="_blank"&gt; Standard_NC6s_v3&lt;/A&gt; (GPU-accelerated compute) in Azure Databricks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it still not enough for me to run Kmean clustering on 252000 data pints  (n_cluster = 11, max iteration = 10) using SparkML and Sckit-learn?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 19:33:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32499#M23693</guid>
      <dc:creator>Dicer</dc:creator>
      <dc:date>2022-10-25T19:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32500#M23694</link>
      <description>&lt;P&gt;@Vidula Khanna​&amp;nbsp;&lt;/P&gt;&lt;P&gt;@orian hindi​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today, I tried to transpose a big data set (Row: 252x17 Columns:1000). 999 columns are structured numerical float data and 1 column is a DateTime data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I deployed &lt;B&gt;Standard_E4ds_v4&lt;/B&gt; in Azure Databricks. That should be enough for transposing the big data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the &lt;B&gt;code&lt;/B&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df_sp500_elements.pandas_api().set_index('stock_dateTime').T.reset_index().rename(columns={"index":"stock_dateTime"}).to_spark().show()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, after running for 14.45 hours, there is still a `&lt;B&gt;Fatal error: The Python kernel is unresponsive`.&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the &lt;B&gt;Ganglia:: cluster Report&lt;/B&gt; during transposition ::&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Ganglia__ cluster Report"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1539i3758E12CC773139B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Ganglia__ cluster Report" alt="Ganglia__ cluster Report" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the &lt;B&gt;Event log&lt;/B&gt;`:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="GC"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1531iA6A484DF844E3D91/image-size/large?v=v2&amp;amp;px=999" role="button" title="GC" alt="GC" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the `&lt;B&gt;Fatal error: The Python kernel is unresponsive` &lt;/B&gt;is not caused by insufficient RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my full `&lt;B&gt;Fatal error: The Python kernel is unresponsive.&lt;/B&gt;` error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;The Python process exited with an unknown exit code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last 10 KB of the process's stderr and stdout can be found below. See driver logs for full logs.&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Last messages on stderr:&lt;/P&gt;&lt;P&gt;Wed Nov 9 12:46:54 2022 Connection to spark from PID 933&lt;/P&gt;&lt;P&gt;Wed Nov 9 12:46:54 2022 Initialized gateway on port 34615&lt;/P&gt;&lt;P&gt;Wed Nov 9 12:46:55 2022 Connected to spark.&lt;/P&gt;&lt;P&gt;/databricks/spark/python/pyspark/sql/&lt;A href="https://dataframe.py" alt="https://dataframe.py" target="_blank"&gt;dataframe.py&lt;/A&gt;:3605: FutureWarning: DataFrame.to_pandas_on_spark is deprecated. Use DataFrame.pandas_api instead.&lt;/P&gt;&lt;P&gt; warnings.warn(&lt;/P&gt;&lt;P&gt;ERROR:root:KeyboardInterrupt while sending command.&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt; File "/databricks/spark/python/pyspark/sql/pandas/&lt;A href="https://conversion.py" alt="https://conversion.py" target="_blank"&gt;conversion.py&lt;/A&gt;", line 364, in _collect_as_arrow&lt;/P&gt;&lt;P&gt; results = list(batch_stream)&lt;/P&gt;&lt;P&gt; File "/databricks/spark/python/pyspark/sql/pandas/&lt;A href="https://serializers.py" alt="https://serializers.py" target="_blank"&gt;serializers.py&lt;/A&gt;", line 56, in load_stream&lt;/P&gt;&lt;P&gt; for batch in self.serializer.load_stream(stream):&lt;/P&gt;&lt;P&gt; File "/databricks/spark/python/pyspark/sql/pandas/&lt;A href="https://serializers.py" alt="https://serializers.py" target="_blank"&gt;serializers.py&lt;/A&gt;", line 112, in load_stream&lt;/P&gt;&lt;P&gt; reader = pa.ipc.open_stream(stream)&lt;/P&gt;&lt;P&gt; File "/databricks/python/lib/python3.9/site-packages/pyarrow/&lt;A href="https://ipc.py" alt="https://ipc.py" target="_blank"&gt;ipc.py&lt;/A&gt;", line 154, in open_stream&lt;/P&gt;&lt;UL&gt;&lt;LI&gt; return RecordBatchStreamReader(source)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 03:53:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32500#M23694</guid>
      <dc:creator>Dicer</dc:creator>
      <dc:date>2022-11-10T03:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32501#M23695</link>
      <description>&lt;P&gt;if a python process does not use spark, such as pandas (not spark pandas), only one node is used. I ran exact same error on a regular cluster with multiple nodes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One solution is to use a &lt;B&gt;single node with a lot of memory&lt;/B&gt; such as 128 G above.  That means allocating enough resolution into a single node instead of splitting into multiple nodes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, I try to avoid pandas as most problems can be solved using spark except for some special utility where there is no other choice.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 01:59:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32501#M23695</guid>
      <dc:creator>lizou</dc:creator>
      <dc:date>2022-11-11T01:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32502#M23696</link>
      <description>&lt;P&gt;Tips&amp;nbsp;to Fix a Fatal Error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search for the error code to find specific instructions. &lt;/P&gt;&lt;P&gt;Update the software. &lt;/P&gt;&lt;P&gt;Update the drivers. &lt;/P&gt;&lt;P&gt;Uninstall any recently installed programs. &lt;/P&gt;&lt;P&gt;Restore Windows to an earlier state. &lt;/P&gt;&lt;P&gt;Disable unnecessary background programs. &lt;/P&gt;&lt;P&gt;Delete temporary files. &lt;/P&gt;&lt;P&gt;Free up space on the hard drive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachel Gomez&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 05:17:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32502#M23696</guid>
      <dc:creator>RachelGomez123</dc:creator>
      <dc:date>2022-11-11T05:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32503#M23697</link>
      <description>&lt;P&gt;Same error. This started a few days ago on notebooks that used to run fine in the past. Now, I cannot finish a notebook.&lt;/P&gt;&lt;P&gt;I have already disabled almost all output being streamed to the result buffer, but the problem persists. I am left with &amp;lt;50 lines being logged/printed. If Databricks cannot handle such a minimal amount of output, it's not a usable solution.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 03:26:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32503#M23697</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-12T03:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Fatal error: Python kernel is unresponsive</title>
      <link>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32504#M23698</link>
      <description>&lt;P&gt;@lizou​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Today, I have the same problem when I spark transpose 1000 columns x 4284 rows structured data matrix. The data size is about  2GB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/NikhilSuthar/TransposeDataFrame" alt="https://github.com/NikhilSuthar/TransposeDataFrame" target="_blank"&gt;https://github.com/NikhilSuthar/TransposeDataFrame&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from pyspark.sql.functions import *
from pyspark.sql import SparkSession
&amp;nbsp;
def TransposeDF(df, columns, pivotCol):
    columnsValue = list(map(lambda x: str("'") + str(x) + str("',")  + str(x), columns))
    stackCols = ','.join(x for x in columnsValue)
    df_1 = df.selectExpr(pivotCol, "stack(" + str(len(columns)) + "," + stackCols + ")")\
             .select(pivotCol, "col0", "col1")
    final_df = df_1.groupBy(col("col0")).pivot(pivotCol).agg(concat_ws("", collect_list(col("col1"))))\
                   .withColumnRenamed("col0", pivotCol)
    return final_df
&amp;nbsp;
&amp;nbsp;
df = TransposeDF(df, df.columns[1:], "AAPL_dateTime")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(The above code works for transposing a small data matrix (eg. 5 columns x 252 rows) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I deploy one 32GB memory VM and there is still a `&lt;B&gt;Fatal error: Python kernel is unresponsive`&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transposing a data matrix should only have O(C x R) space complexity and runtime complexity.&lt;/P&gt;&lt;P&gt;In my case, that should be 2GB of space complexity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the Databricks Live metrics. Only 20% CPU is used and there is still 20 GB of free memory. However, there is a `&lt;B&gt;Driver is up but not responsive, likely due to GC&lt;/B&gt;` in the event log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have no idea why there is still `&lt;B&gt;Fatal error: Python kernel is unresponsive` &lt;/B&gt;&lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt; . Perhaps, It is not only related to memory?&lt;span class="lia-unicode-emoji" title=":dizzy_face:"&gt;😵&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I am trying one 112 GB memory GPU to transpose a 2 GB data matrix. And there is no `&lt;B&gt;Driver is up but not responsive, likely due to GC` &lt;/B&gt;in the event log. Hope this works. But still cannot understand why transposing a 2 GB data matrix needs that amount of memory&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 06:20:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/fatal-error-python-kernel-is-unresponsive/m-p/32504#M23698</guid>
      <dc:creator>Dicer</dc:creator>
      <dc:date>2022-11-12T06:20:07Z</dc:date>
    </item>
  </channel>
</rss>

