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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
asifraza
Regular Visitor

Datas science Fabric Notebook run issue - Session restart

While working on notebook, frequently I am facing this issue , note I am using the Trial version data science.

 

InternalError: Ipython kernel exits with code 9. Please restart your session.


1 ACCEPTED SOLUTION
asifraza
Regular Visitor

Here is tips regarding writing code on notebook:

1-  Avoid or declare any kind of unwanted variable. you can simply use the del to delete it from memory. try to use one variable and override it again and again.

2- add the following code start of the cell (beginning of notebook),  %reset -f (Clear all variables forcefully). re-run the all cells

View solution in original post

6 REPLIES 6
asifraza
Regular Visitor

Here is tips regarding writing code on notebook:

1-  Avoid or declare any kind of unwanted variable. you can simply use the del to delete it from memory. try to use one variable and override it again and again.

2- add the following code start of the cell (beginning of notebook),  %reset -f (Clear all variables forcefully). re-run the all cells

Hi @asifraza 

 

We are glad to hear that your query got resolved. Please continue using Microsoft Fabric Community for your further queries. Your insights on writing code within notebooks will be beneficial to other community members. Thank you for your contribution.

 

Thanks.

v-cboorla-msft
Microsoft Employee
Microsoft Employee

Hi @asifraza 

 

Thanks for using Microsoft Fabric Community.

As I understand that you are encountering an error message "InternalError: Ipython kernel exits with code 9. Please restart your session." while running on Notebook. This error message indicates that the IPython kernel has exited with a code - 9, which usually means that the kernel has been killed by the operating system.

There could be several reasons why this is happening.

One possible reason is that the kernel is running out of memory. You can try to reduce the memory usage of your code by optimizing your code or reducing the size of the data you are working with. Check if any large data structures are causing memory exhaustion.

Another possible reason is that there is a bug in operating system that is causing the kernel to crash. You can try to check the logs as mentioned in the document : Use the Monitoring hub.

If the issue persists, you can try restarting your session or the kernel to see if that resolves the issue.

 

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

 

Thanks.

@v-cboorla-msft  Thanks for your prompt answer, could you please share the steps how i can check the 
1- kernel is running out of memory?
2- How to restart the kernal or session in notebook / datascience?

Please note, i;m using the trial version.
Thanks.

Hi @asifraza 

 

1. The Microsoft Fabric Capacity Metrics app is designed to provide monitoring capabilities for Microsoft Fabric capacities. Use the app to monitor your capacity consumption and make informed decisions on how to use your capacity resources.

For more details please refer : What is the Microsoft Fabric Capacity Metrics app

2. Stop session cancels the running and waiting cells and stops the current session. You can restart a brand new session by selecting the run option again.

For more details please refer: restart session.

 

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

 

Thanks.

Hi @asifraza 

 

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.


Thanks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.