Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jeanxyz
Impactful Individual
Impactful Individual

how to monitor notebook connection time

I have a spark notebook which use a custom environment. I notice the scheduled run duration has doubled recently. I checked notebook run snapshot, it looks the actual execution time hasn't increased, so I suspect the duration increase because notebook connection time has increased significantly. How can I monitor notebook connection time during the past one week?

1 ACCEPTED SOLUTION
tayloramy
Community Champion
Community Champion

Hi @Jeanxyz,

 

You’re seeing the scheduled run duration grow while the notebook run snapshot still shows similar execution time. That typically means extra time is being spent before the first cell actually runs (queueing + Spark session startup/attach, often impacted by custom environments).

 

  1. Use Monitoring Hub (Historical view) to estimate startup time last 7 days. Filter to your notebook, switch to Historical view, and compare Total duration vs Running duration. The gap is a good proxy for “connection/startup” time. History goes back 30 days. See: Monitor hub.
  2. Check the Capacity Metrics app for capacity pressure during your schedule window. Spikes in capacity load often show up as longer queue/attach times. See: Capacity Metrics app and guidance to optimize capacity.
  3. Enable Workspace Monitoring and query logs. Workspace Monitoring creates an Eventhouse with logs/metrics you can query over the past week to chart startup overhead by run. See: Workspace monitoring overview.
  4. If you’re using a custom Environment, make sure libraries are pre-installed and published. Avoid %pip at runtime; published environments reduce session spin-up. See: community guidance on using Environments instead of inline installs: thread. Also see Fabric’s notebook troubleshooting tips: troubleshooting guide.

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

View solution in original post

8 REPLIES 8
v-nmadadi-msft
Community Support
Community Support

Hi @Jeanxyz 

As we haven’t heard back from you, we wanted to kindly follow up to check if the suggestions  provided by the community members for the issue worked. Please feel free to contact us if you have any further questions.

 

Thanks and regards

Sorry for late reply, I don't think there is a good solution from Microsoft. I have ticked the answer from Taloramy as an answer.

 

v-nmadadi-msft
Community Support
Community Support

Hi @Jeanxyz 

May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

BhaveshPatel
Community Champion
Community Champion

Hi @Jeanxyz

 

To better get an idea,  Apache Spark ( Data Lake) does not show running duration of the job .

Total Duration = It takes time to run the job. It varies on lot of other factors..

 

Also use best practices when using linux systems. ( Kimball methodology + Fact/Dim Tables structure etc...)

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
v-nmadadi-msft
Community Support
Community Support

Hi @Jeanxyz 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


Thank you.

v-nmadadi-msft
Community Support
Community Support

Hi @Jeanxyz  ,
Thanks for reaching out to the Microsoft fabric community forum.

If you believe a lot of time is being spent in starting the spark session which gets automatically shut down after a period of 20 minutes, which is the default timeout time.
You can adjust the session timeout at the notebook or workspace level.

To change the timeout settings, open a notebook and start a session from the Connect toolbar menu. Once the session is active, click the Session ready indicator in the lower-left corner of the notebook, and in the dialog that appears you can adjust the timeout duration as needed.

 

vnmadadimsft_0-1759224075186.png

 

 


I hope this information helps. Please do let us know if you have any further queries.
Thank you

tayloramy
Community Champion
Community Champion

Hi @Jeanxyz,

 

You’re seeing the scheduled run duration grow while the notebook run snapshot still shows similar execution time. That typically means extra time is being spent before the first cell actually runs (queueing + Spark session startup/attach, often impacted by custom environments).

 

  1. Use Monitoring Hub (Historical view) to estimate startup time last 7 days. Filter to your notebook, switch to Historical view, and compare Total duration vs Running duration. The gap is a good proxy for “connection/startup” time. History goes back 30 days. See: Monitor hub.
  2. Check the Capacity Metrics app for capacity pressure during your schedule window. Spikes in capacity load often show up as longer queue/attach times. See: Capacity Metrics app and guidance to optimize capacity.
  3. Enable Workspace Monitoring and query logs. Workspace Monitoring creates an Eventhouse with logs/metrics you can query over the past week to chart startup overhead by run. See: Workspace monitoring overview.
  4. If you’re using a custom Environment, make sure libraries are pre-installed and published. Avoid %pip at runtime; published environments reduce session spin-up. See: community guidance on using Environments instead of inline installs: thread. Also see Fabric’s notebook troubleshooting tips: troubleshooting guide.

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Jeanxyz
Impactful Individual
Impactful Individual

Thanks @tayloramy In monitor hub, I only find total duration, not the running duration. 

As a quick fix, I create an empty notebook using the same Spark environment. In this way, the total duration of this notebook = connection duration. It looks the duration time is quite long, 7 minutes. This is ironically because I have only installed one public package in the library. It will save time if I run pip install each time rather than using a custom environmennt. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.