<?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 Notebook in Pipeline Takes Forever to Run in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4114264#M5101</link>
    <description>&lt;P&gt;Hi Experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very new to Fabric and still learning! I implemented my first Notebook using PySpark. It is quite simple. I have a string parameter that I am passing to the notebook. Then simply trying to save that to a JSON file in my Lakehouse. I can run the code within the editor successfully in less than 1 second. However, when I try to run the my Notebook in a Pipeline, it gets stuck in Starting State for 10+ minutes before it starts/finishes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a snapshot of my Notebook (it is based on a solution provided in one of my other threads):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, as you can see, I have set up FromPipeline as a Parameter in my Notebook. And I am able to run the code and write out the FileList.json file to the Files root directory in my default lakehouse in less than a second. So, from what I can see all is good in my Notebook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I bring the Notebook into a Pipeline, I pass a string variable in FromPipeline:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it takes more than 10 minutes for the Notebook to execute. If I click on while in progress it says something about in a Starting State.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What is going on here? Is there a setting somewhere in Fabric that I need to configure for Notebooks to run properly in pipelines? This can't be standard behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2024 21:34:45 GMT</pubDate>
    <dc:creator>WishAskedSooner</dc:creator>
    <dc:date>2024-08-22T21:34:45Z</dc:date>
    <item>
      <title>Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4114264#M5101</link>
      <description>&lt;P&gt;Hi Experts!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very new to Fabric and still learning! I implemented my first Notebook using PySpark. It is quite simple. I have a string parameter that I am passing to the notebook. Then simply trying to save that to a JSON file in my Lakehouse. I can run the code within the editor successfully in less than 1 second. However, when I try to run the my Notebook in a Pipeline, it gets stuck in Starting State for 10+ minutes before it starts/finishes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a snapshot of my Notebook (it is based on a solution provided in one of my other threads):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, as you can see, I have set up FromPipeline as a Parameter in my Notebook. And I am able to run the code and write out the FileList.json file to the Files root directory in my default lakehouse in less than a second. So, from what I can see all is good in my Notebook.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I bring the Notebook into a Pipeline, I pass a string variable in FromPipeline:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it takes more than 10 minutes for the Notebook to execute. If I click on while in progress it says something about in a Starting State.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;What is going on here? Is there a setting somewhere in Fabric that I need to configure for Notebooks to run properly in pipelines? This can't be standard behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 21:34:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4114264#M5101</guid>
      <dc:creator>WishAskedSooner</dc:creator>
      <dc:date>2024-08-22T21:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4114399#M5105</link>
      <description>&lt;P&gt;In my case it only takes 20 seconds to run the Notebook. The entire pipeline runs in less than 1,5 minutes. I am on the trial capacity which is similar to F64. Not sure if the capacity size matters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 00:40:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4114399#M5105</guid>
      <dc:creator>frithjof_v</dc:creator>
      <dc:date>2024-08-23T00:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4115930#M5117</link>
      <description>&lt;P&gt;I am on a Premium account. Made some changes to my Notebook this morning and same thing........taking forever to start up, going on 15 minutes as I type this reply. I really need someone from Microsoft to respond because I have no idea how to even troubleshoot this problem. And 10+ minutes for a Notebook to start in a Pipeline is a deal killer for development. What should I do Microsoft? Open a ticket? Please I need some help.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 14:41:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4115930#M5117</guid>
      <dc:creator>WishAskedSooner</dc:creator>
      <dc:date>2024-08-23T14:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117276#M5128</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="745073" data-lia-user-login="WishAskedSooner" class="lia-mention lia-mention-user"&gt;WishAskedSooner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command will always run pretty fast in the Notebook because the Spark Cluster is already up and running when that cell runs.&amp;nbsp; If you look at the time it takes the very first time you Run on a Notebook (without starting a session first) you will see the spark cluster spin-up time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a Notebook is run from a Pipeline it has to provision and start a Spark Session and Spark Clusters based on the Workspace &amp;amp; Environment configuration.&amp;nbsp; This can take time depending on whether or not you've changed settings.&amp;nbsp; If you leave everything as the default; Microsoft has clusters ready to go so things can go quick.&amp;nbsp; If you've made any changes or setup your own Environment Configuration, it will take longer because it is spinning up a cluster specific to your configuration.&amp;nbsp; Our clusters take 3-5m to start-up sometimes longer based on capacity limitations etc.&amp;nbsp; There are cases where our startup has taken 10m as well but that has been the exception.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 14:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117276#M5128</guid>
      <dc:creator>jwinchell40</dc:creator>
      <dc:date>2024-08-25T14:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117300#M5129</link>
      <description>&lt;P&gt;Good point. I have been thinking about the same myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="745073" data-lia-user-login="WishAskedSooner" class="lia-mention lia-mention-user"&gt;WishAskedSooner&lt;/a&gt;&amp;nbsp;hasn't done any changes to pools or environments, the starter pools should spin up in a matter of few seconds, also when the notebook is run inside a data pipeline, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I don't make any changes to pools or environments, just use the starter pools, then a notebook can start up in a few seconds&amp;nbsp; in a data pipeline (at least less than 30 seconds, perhaps just a couple of seconds). I'm on a trial capacity (~F64).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However applying an environment, or using another pool than the starter pool, leads to increased start-up time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be the reason, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="745073" data-lia-user-login="WishAskedSooner" class="lia-mention lia-mention-user"&gt;WishAskedSooner&lt;/a&gt;? Have you made any configuration regarding pools/environment? If you want minimal start-up time, these settings should be left untouched.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 15:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117300#M5129</guid>
      <dc:creator>frithjof_v</dc:creator>
      <dc:date>2024-08-25T15:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117333#M5130</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="437984" data-lia-user-login="frithjof_v" class="lia-mention lia-mention-user"&gt;frithjof_v&lt;/a&gt;&amp;nbsp; - Completely agree.&amp;nbsp; Another thing that comes into play would be the libraries being imported.&amp;nbsp; There reason why we created our own environments is because we were loading the Semantic Link library and it would take forever and it had to run for each Notebook.&amp;nbsp; The environment pre-loads it so we only take hit on initial start-up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="745073" data-lia-user-login="WishAskedSooner" class="lia-mention lia-mention-user"&gt;WishAskedSooner&lt;/a&gt;&amp;nbsp;- Have you taken a look at the Snapshot logs from the data pipeline?&amp;nbsp; You can get there from the viewing the run history; just click on the Notebook step.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then check the Run Detail stats:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also take a look at the Resources Preview Dashboard; can show you how long things are waiting vs running.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to say I understand everything the logs show; but maybe it will help point to something as well.&amp;nbsp; I also think it is worth opening a ticket up with Microsoft for direct support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 16:22:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4117333#M5130</guid>
      <dc:creator>jwinchell40</dc:creator>
      <dc:date>2024-08-25T16:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook in Pipeline Takes Forever to Run</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4122419#M5168</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Something that's worth checking is if you're using the basic starter pools on any sku up to an F16 (I believe) you will only be able to have 1 maybe 2 spark sessions open.&lt;BR /&gt;As such, if you have a notebook session open while trying to run notebooks through pipelines, the pipelines just wait for a session to become available. I've seen this wait up to 20 minutes before just because I forgot to close a notebook I was tinkering with.&lt;BR /&gt;Hope this helps, let me know if you need anymore information.&lt;BR /&gt;This blog explains it really well:&amp;nbsp;&lt;A href="https://www.advancinganalytics.co.uk/blog/2023/12/13/fabric-notebook-concurrency-explained" target="_blank"&gt;https://www.advancinganalytics.co.uk/blog/2023/12/13/fabric-notebook-concurrency-explained&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 09:12:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Notebook-in-Pipeline-Takes-Forever-to-Run/m-p/4122419#M5168</guid>
      <dc:creator>cjbowman69</dc:creator>
      <dc:date>2024-08-28T09:12:29Z</dc:date>
    </item>
  </channel>
</rss>

