Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We’ve noticed a long-running user session in Microsoft Fabric. Could you confirm whether there is a way to manually terminate user sessions after they have been running beyond a specified threshold?
I’ve reviewed documentation related to background activity in Lakehouse databases, but I need guidance on ending the session from a capacity-level control perspective (rather than within an individual Lakehouse/database context).
Hi @v-lgarikapat and @lbendlin,
In the Fabric report, we can check what has been executed, what is currently running, CU usage, etc. I would like to know if it's possible to terminate a user session once it meets a specific criterion, such as a session being open for more than 1 minute.
I hadn’t considered Spark, but is it also possible to terminate the session of a specific user who has been running a notebook for a long time?
Notebooks run inside spark sessions. Killing the session will terminate the notebook.
Sure! And what about other processes? I would like to terminate a process when it reaches a specific execution time, for example
HI @felipecpereira ,
No native feature currently allows automatic session termination based on runtime duration. However, you can:
Monitor session duration manually through the Capacity Metrics or Spark Monitoring UI
Trigger actions via API or automation, but this requires you to:
Use the Microsoft Fabric REST APIs to pull session/user details
Cross-reference session starts times and durations
Use scripting (PowerShell, Python) to call the DELETE endpoint for those sessions
Same goes for other process typesrefreshes, queries, pipelines. Termination usually isn’t exposed unless it’s a Spark notebook.
Solved: SparkSession don't stop - Microsoft Fabric Community
Microsoft Fabric REST API references - Microsoft Fabric REST APIs | Microsoft Learn
Workspace administration settings in Microsoft Fabric - Microsoft Fabric | Microsoft Learn
Best Regards,
Lakshmi
Hi @felipecpereira ,
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
Could you please provide more details in order to propose the appropriate solution? Please specify if you are referring to Spark sessions or something else
We look forward to hearing from you.
Best regards,
Lakshmi
Please specify if you mean Spark sessions or something else.
User | Count |
---|---|
24 | |
17 | |
6 | |
5 | |
2 |
User | Count |
---|---|
49 | |
43 | |
18 | |
7 | |
6 |