<?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: notebook duration time issue in Fabric platform</title>
    <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734435#M17469</link>
    <description>&lt;P&gt;I have another question.&amp;nbsp;This is my pipeline visual guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is what is the best practice to use a session mechanism for this structure?&amp;nbsp;&lt;BR /&gt;Is session start time included in CU calculation?&lt;BR /&gt;What is the right way to configure high concurrency for pipeline running multiple notebooks?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jun 2025 07:52:53 GMT</pubDate>
    <dc:creator>um4ndr</dc:creator>
    <dc:date>2025-06-17T07:52:53Z</dc:date>
    <item>
      <title>notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4733479#M17427</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone explain why the snapshot duration time of the process doesn't match the running duration time.&amp;nbsp;My process is very simple and doesn't involve any complicated tasks.&amp;nbsp;And the most important thing is that this does not happen all the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 12:08:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4733479#M17427</guid>
      <dc:creator>um4ndr</dc:creator>
      <dc:date>2025-06-16T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734289#M17458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="737857" data-lia-user-login="um4ndr" class="lia-mention lia-mention-user"&gt;um4ndr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for sharing the detailed screenshots. Based on the screenshots you provided, I’ve identified a few possible causes and included relevant resources to help you troubleshoot the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.Running Duration (4m 36s)&lt;BR /&gt;This is correct your code executed quickly.&lt;BR /&gt;2.Snapshot Duration (1h 4m 53s)&lt;BR /&gt;This includes idle session time, which happens when&lt;BR /&gt;The notebook cell was executed, but the session was left open.&lt;BR /&gt;Spark session was not explicitly stopped ( spark.stop()).&lt;BR /&gt;The notebook was left idle, and the Fabric backend eventually auto closed the session (session timeout).&lt;BR /&gt;3.Total Duration (6m 12s)&lt;BR /&gt;This is within expectations (queued + run).&lt;BR /&gt;4.Pipeline Duration (1h 5m 24s)&lt;BR /&gt;Matches the snapshot duration because the pipeline is waiting on the notebook to finish, including idle time.&lt;/P&gt;
&lt;P&gt;If your Spark session or notebook finishes and auto disconnects cleanly, durations are short.&lt;BR /&gt;If user leaves the notebook open, or if timeouts are triggered (as seen with your timeout_minutes = 60), the session runs until timeout which explains the long duration.&lt;BR /&gt;Spark session might be reusing or waiting on idle resources longer depending on cluster load or driver behaviour.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Below are a few troubleshooting steps&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. Explicitly Stop Spark Session&lt;BR /&gt;Add this at the end of your notebook/script&lt;BR /&gt;spark.stop()&lt;BR /&gt;This ends the session right after execution, avoiding long idle periods.&lt;BR /&gt;2. Reduce Timeout Parameter&lt;BR /&gt;You're passing timeout_minutes = 60. Lower this to reduce idle wait times:&lt;BR /&gt;timeout_minutes = 10&amp;nbsp; or a value closer to expected runtime&lt;BR /&gt;3. Log Notebook Exit&lt;BR /&gt;Use logging and notebook exit calls like&lt;BR /&gt;from notebookutils import mssparkutils&lt;BR /&gt;mssparkutils.notebook.exit("Completed")&lt;BR /&gt;4. Check Pipeline Config&lt;BR /&gt;In Fabric Pipelines&lt;BR /&gt;Ensure Wait for notebook to complete is configured.&lt;BR /&gt;Review activity timeout settings&amp;nbsp; they may inherit session timeouts.&lt;BR /&gt;5.Cluster or Fabric Load&lt;BR /&gt;On some occasions, backend cluster load or resource allocation delay can contribute to longer session lives. Monitor this from the Spark History Server for deeper analysis&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have included previously resolved threads and learning documents here; they may help you resolve the issue&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Pipeline/Stopping-Spark-Session-inside-outside-ForEach/m-p/4093259" target="_blank" rel="noopener"&gt;Solved: Re: Stopping Spark Session inside/outside ForEach - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-platform/Notebook-Status-Stopped-Session-Timed-Out/m-p/4638159" target="_blank" rel="noopener"&gt;Solved: Re: Notebook Status - Stopped (Session Timed Out) - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/workspace-admin-settings" target="_blank" rel="noopener"&gt;Workspace administration settings in Microsoft Fabric - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/author-execute-notebook" target="_blank" rel="noopener"&gt;Develop, execute, and manage notebooks - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-factory/notebook-activity" target="_blank" rel="noopener"&gt;Notebook activity - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helped resolve your issue, please consider the &lt;STRONG&gt;Accepted Solution&lt;/STRONG&gt;. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.&lt;/P&gt;
&lt;P&gt;We appreciate your engagement and thank you for being an active part of the community.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Best regards,&lt;BR /&gt;LakshmiNarayana&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 06:11:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734289#M17458</guid>
      <dc:creator>v-lgarikapat</dc:creator>
      <dc:date>2025-06-17T06:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734335#M17466</link>
      <description>&lt;P&gt;Thank you very much. Very helpful content.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 06:50:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734335#M17466</guid>
      <dc:creator>um4ndr</dc:creator>
      <dc:date>2025-06-17T06:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734435#M17469</link>
      <description>&lt;P&gt;I have another question.&amp;nbsp;This is my pipeline visual guide.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is what is the best practice to use a session mechanism for this structure?&amp;nbsp;&lt;BR /&gt;Is session start time included in CU calculation?&lt;BR /&gt;What is the right way to configure high concurrency for pipeline running multiple notebooks?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jun 2025 07:52:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4734435#M17469</guid>
      <dc:creator>um4ndr</dc:creator>
      <dc:date>2025-06-17T07:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4735638#M17509</link>
      <description>&lt;P&gt;Below is an informative answer on the topic&amp;nbsp;&lt;BR /&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-platform/Fabric-notebook-session-mechanism-best-practices/m-p/4735560/thread-id/17502#M17503" target="_blank"&gt;Solved: Fabric notebook session mechanism - best practices - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 08:20:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4735638#M17509</guid>
      <dc:creator>um4ndr</dc:creator>
      <dc:date>2025-06-18T08:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: notebook duration time issue</title>
      <link>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4735672#M17510</link>
      <description>&lt;P&gt;Thanks a lot, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="737857" data-lia-user-login="um4ndr" class="lia-mention lia-mention-user"&gt;um4ndr&lt;/a&gt;&amp;nbsp;! That was a very informative and helpful post. Appreciate you sharing the best practices definitely gave me better clarity on the Fabric notebook session mechanism.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Best Regards,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Lakshmi Narayana&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 08:56:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Fabric-platform/notebook-duration-time-issue/m-p/4735672#M17510</guid>
      <dc:creator>v-lgarikapat</dc:creator>
      <dc:date>2025-06-18T08:56:48Z</dc:date>
    </item>
  </channel>
</rss>

