Forum Discussion
Notebook Status - Stopped (Session Timed Out)
- 1 year ago
Hi Mirdula π
Thank you for your detailed feedback.
What you're experiencing is quite common in Spark-based environments like Microsoft Fabric. Here's a quick clarification that may help:
When a notebook completes all cells successfully, but the Spark session doesn't close explicitly, the Fabric platform sometimes registers the session as "Stopped" instead of "Success" β even though no error occurred.
What you can try:
To ensure the session ends gracefully, you can manually stop the Spark session at the end of your notebook using:
spark.stop()
This helps Fabric detect that the notebook has completed intentionally, not due to timeout or inactivity.
Also, adding a cell like this at the end of your notebook might help signal a successful end:
print("Notebook completed successfully.")
While this doesn't guarantee a βSuccessβ label in every case (as it depends on backend handling), it improves the chances β and keeps your logs cleaner.
Let me know if that helps!
And if the previous suggestion worked partially, feel free to mark it as solution and give a Kudo if it helped. π
Hi Mirdula π
Thank you for your detailed feedback.
What you're experiencing is quite common in Spark-based environments like Microsoft Fabric. Here's a quick clarification that may help:
When a notebook completes all cells successfully, but the Spark session doesn't close explicitly, the Fabric platform sometimes registers the session as "Stopped" instead of "Success" β even though no error occurred.
What you can try:
To ensure the session ends gracefully, you can manually stop the Spark session at the end of your notebook using:
spark.stop()
This helps Fabric detect that the notebook has completed intentionally, not due to timeout or inactivity.
Also, adding a cell like this at the end of your notebook might help signal a successful end:
print("Notebook completed successfully.")
While this doesn't guarantee a βSuccessβ label in every case (as it depends on backend handling), it improves the chances β and keeps your logs cleaner.
Let me know if that helps!
And if the previous suggestion worked partially, feel free to mark it as solution and give a Kudo if it helped. π
Hi Rufyda,
This makes more sense and has solved my confusion.
Thank you so much π