Forum Discussion
Fabric Notebook disconnects when running a certain code cell
- 1 year ago
Hi stomori ,
This looks like a session-level failure that happens before your code even starts running — usually tied to Spark kernel startup or resource allocation issues.
Here’s what might be causing it and what you can try:
Session Timeout or Idle Expiry
If the notebook was idle for a while, the session might have expired silently. Try restarting the notebook kernel and re-running the cell immediately.Spark Pool Resource Limits
Even if your colleague increased the pool size, check if:- The max concurrency is being hit (too many notebooks using the same pool)
- The session quota per user is exceeded
Code Cell Content
If the cell has heavy operations (e.g. large joins, wide transformations), try:- Breaking it into smaller steps
- Caching intermediate results
- Logging the Spark plan (df.explain())
Plugin State: Cleanup
This usually means the session failed during init and Fabric is cleaning up. It could be a transient backend issue — try running the same cell in a new notebook or after a short wait.Diagnostics
Since you don’t have admin rights, ask your admin to check:- Spark job logs in the Fabric Admin portal
- Capacity metrics around the time of failure
Let me know if you want help reviewing the code in that cell — sometimes a small tweak can avoid triggering these session-level errors.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Hi stomori ,
This looks like a session-level failure that happens before your code even starts running — usually tied to Spark kernel startup or resource allocation issues.
Here’s what might be causing it and what you can try:
Session Timeout or Idle Expiry
If the notebook was idle for a while, the session might have expired silently. Try restarting the notebook kernel and re-running the cell immediately.Spark Pool Resource Limits
Even if your colleague increased the pool size, check if:- The max concurrency is being hit (too many notebooks using the same pool)
- The session quota per user is exceeded
Code Cell Content
If the cell has heavy operations (e.g. large joins, wide transformations), try:- Breaking it into smaller steps
- Caching intermediate results
- Logging the Spark plan (df.explain())
Plugin State: Cleanup
This usually means the session failed during init and Fabric is cleaning up. It could be a transient backend issue — try running the same cell in a new notebook or after a short wait.Diagnostics
Since you don’t have admin rights, ask your admin to check:- Spark job logs in the Fabric Admin portal
- Capacity metrics around the time of failure
Let me know if you want help reviewing the code in that cell — sometimes a small tweak can avoid triggering these session-level errors.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Hi Burak,
I have now tried step 4 of running the cell in a new notebook, and this seems to resolve the issue.
Thanks a lot for your response!