Forum Discussion
Question Regarding Terminating Long-Running User Sessions in Microsoft Fabric
- 1 year ago
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
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
- v-lgarikapat1 year agoCommunity Support
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
- v-lgarikapat1 year agoCommunity Support
Hi felipecpereira ,
We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.
Best Regards,
Lakshmi
- v-lgarikapat1 year agoCommunity Support
Hi felipecpereira ,
We haven’t heard back from you regarding our last response, so I just wanted to check in to see if you were able to resolve the issue. If you have any further questions or need assistance, please feel free to let us know.
Best Regards,
Lakshmi