We started real Jupyter kernels with jupyter_client, the library Jupyter Server uses to run them, and tried to kill them in five different ways, on a Windows 11 laptop and in a Linux container capped at 512 MB. For each one we recorded what the parent process saw, what the kernel printed, and what JupyterLab and its server log showed.
The short answer: "The kernel appears to have died. It will restart automatically." means the Python process running your notebook's code exited without being asked to. Jupyter noticed, started a fresh kernel, and every variable is gone. The usual causes: the operating system killed it for using too much memory (signal 9, shown as 137 in a shell, on Linux), a crash in compiled code such as a TensorFlow or PyTorch import (signal 11 or 4), or a library that aborted over conflicting versions (signal 6). A cell stuck in a loop is busy, not dead. To tell them apart, read the terminal running Jupyter, check dmesg, and run the cell as a plain script. Checked 2 December 2026.
Fastero
Jupyter notebooks for your team, with nothing to install.
Start a notebook or bring your .ipynb files. SQL cells query your databases with no password in the code, and a notebook runs now or on a schedule. Colleagues open it with their own login; viewers are free.
Try free →What "the kernel appears to have died" means
Your notebook's code doesn't run in the browser or in Jupyter itself. As Jupyter's own example notebook puts it, "Code is run in a separate process called the Kernel." Jupyter Server keeps checking whether that process is still alive, every 3 seconds by default in jupyter_client's restarter. When it finds the process gone, it starts a new one and tells the notebook, which shows the dialog.

JupyterLab 4.6.6 on our laptop, seconds after a cell called os.abort().
The same event has different wording depending on where you run the notebook:
| Where | What it says |
|---|---|
| JupyterLab 4 and Notebook 7 | Kernel Restarting: "The kernel for %1 appears to have died. It will restart automatically.", with the file name for %1 |
| Classic Notebook 6 | "The kernel appears to have died. It will restart automatically." |
| After the restarts fail | "The kernel has died, and the automatic restart has failed." |
| VS Code | "The Kernel crashed while executing code in the current cell or a previous cell." |
By default the restarter tries five times in a row before giving up with the third message; its setting is described as "The number of consecutive autorestarts before the kernel is presumed dead". The terminal where you started Jupyter shows the restart too. These are the lines from our run:
[I 2026-12-02 03:16:42.838 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
[W 2026-12-02 03:16:42.838 ServerApp] kernel 78973e32-e46d-499a-b4cb-3ebe0791b083 restartedNeither line says why. The why is in what the kernel printed just before, in the system log, or in the exit code.
What we saw when we killed kernels on purpose
Our script starts a fresh kernel for each case, sends one cell, then checks whether the kernel process is alive and what exit code it left. The core of it:
from jupyter_client import KernelManager
log = open("kernel.log", "w+") # stands in for Jupyter's terminal
km = KernelManager(kernel_name="python3")
km.start_kernel(stdout=log, stderr=log)
kc = km.client()
kc.start_channels()
kc.wait_for_ready(timeout=60)
kc.execute("import os; os.abort()")
# ...wait for a reply or for the process to go...
print(km.is_alive(), km.provisioner.process.poll())We ran it on 2 December 2026 with jupyter_client 8.10.0 and ipykernel 7.4.0: on Windows 11 with Python 3.14.3, and in Docker's python:3.14-slim (Python 3.14.10) started with --memory 512m --memory-swap 512m, so nothing could use more than 512 MB. On Windows we capped the memory case at 512 MiB with a job object.
| Cell | Linux, 512 MB container | Windows 11 | Did the kernel die? |
|---|---|---|---|
print(2 + 2) |
Reply ok | Reply ok | No |
os.abort() |
Exit -6 (SIGABRT) | Exit 0xC0000409 | Yes |
| A simulated segfault | Exit -11 (SIGSEGV) | Exit 3 | Yes |
Ask for 1 PiB: bytearray(1 << 50) |
MemoryError, kernel alive |
MemoryError, kernel alive |
No |
| Write 1 GiB under a 512 MiB cap | Exit -9 (SIGKILL) | MemoryError, kernel alive |
On Linux only |
while True: pass |
Busy until interrupted | Busy until interrupted | No |
The simulated segfault is faulthandler._sigsegv(), a private helper in Python's faulthandler module that crashes the interpreter on purpose, the way a broken compiled library would.
How to read the exit codes: in Python, "A negative value -N indicates that the child was terminated by signal N (POSIX only)", and Linux's signal table gives SIGILL as 4, SIGABRT 6, SIGKILL 9 and SIGSEGV 11. A shell adds 128, which is why a memory kill shows as 137 and a segfault as 139.
Three results surprised us:
- Running out of memory killed the Linux kernel but not the Windows one. On Linux the 1 GiB write got the kernel killed with no traceback and no message from Python. On Windows the allocation was refused, the cell showed
MemoryError, and the kernel carried on. Our MemoryError guide explains why the two systems behave differently. - A clean
MemoryErrordoesn't kill the kernel. Asking for 1 PiB failed at once on both systems and the kernel survived. If you see aMemoryErrortraceback in the cell, the kernel didn't die; if the kernel died, there was probably noMemoryErrorto see. - Windows' abort code isn't the documented one. Python's docs say that on Windows "the process immediately returns an exit code of 3". We got 0xC0000409. Microsoft's docs say that by default abort hands over to Windows Error Reporting, after which the app can end "with an error code that's defined by the operating system". Microsoft's list of status codes names 0xC0000409 STATUS_STACK_BUFFER_OVERRUN, so don't read that name literally after an abort.
In the container, dmesg (read from a privileged container on the same Docker host) showed the memory kill. ZMQbg/IO/0 is a thread inside the kernel, the one that handles its messages:
[ 519.016110] ZMQbg/IO/0 invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[ 519.061894] Memory cgroup out of memory: Killed process 6957 (python) total-vm:1869804kB, anon-rss:483796kB, file-rss:17152kB, shmem-rss:0kB, UID:0 pgtables:1140kB oom_score_adj:0The common causes, and how to tell which one you have

From symptom to cause. The exit codes are what the process that started the kernel sees; -9, -11 and -6 are from our Linux run.
1. Out of memory: the operating system killed it
This is the first suspect when the kernel dies while loading, merging or modeling a large dataset. On Linux, when a process or its container runs out, the kernel's OOM killer ends it with SIGKILL, which can't be caught, so Python prints nothing. The cgroup documentation says that when a group's usage "reaches this limit and can’t be reduced, the OOM killer is invoked in the cgroup". Hosted Jupyter works the same way: the Zero to JupyterHub guide says that past a user's limit, "requests for more RAM will fail (your kernel will usually die)". Colab shows its own message for it; see our Colab limits guide.
How to tell: memory climbs in Task Manager, Activity Monitor or htop before the death; the kernel prints nothing; and on Linux the system log names the process:
sudo dmesg -T | grep -i "killed process"The fix is to use less memory, or to get more. Work out how big the array or DataFrame will be before you load it (our MemoryError guide shows the arithmetic), use smaller dtypes and chunks (pandas out of memory), and delete what you no longer need: the notebook's output history keeps old results alive, as Jupyter notebook memory usage explains.
2. A crash in compiled code, often on an import
When the kernel dies on import tensorflow or import torch, or the first time a model runs, the crash is usually in compiled C, C++ or CUDA code, not in Python. VS Code's Jupyter team writes: "It has been observed that the most common cause (if not the only cause) of failures for random kernel crashes after it has started is due to incorrectly installed packages." Their example is TensorFlow. TensorFlow's install page adds a hardware cause: "TensorFlow binaries use AVX instructions which may not run on older CPUs", which ends in an illegal instruction.
How to tell: the terminal shows Segmentation fault or Illegal instruction, or nothing, and the exit code is -11 or -4 (on Windows, a large number such as 0xC0000005, an access violation). To see which line crashed, Python's faulthandler module dumps a traceback "on a fault". On Windows our kernel wrote it to the terminal after we called faulthandler.enable() in the cell:
Fatal Python error: Segmentation fault
Thread 0x0000a500 [Tornado selector] (most recent call first):
...
File "C:\Users\<you>\AppData\Local\Temp\ipykernel_36012\4041108482.py", line 1 in <module>
[78 lines in all; our user name replaced]On Linux the same cell left nothing in the kernel's log, so run the code as a plain script with the handler on. This worked in the container:
# crash.py
import faulthandler
print("loading the model")
faulthandler._sigsegv() # stands in for a crash inside a compiled librarypython -X faulthandler crash.pyFatal Python error: Segmentation fault
Current thread 0x00007f62cde00380 [python] (most recent call first):
File "/tmp/crash.py", line 3 in <module>
[C stack trace trimmed]
Segmentation fault (core dumped)
exit status: 139Notice that loading the model never appeared: the output was still in Python's buffer when the process died. Run with python -u, or print with flush=True, when you want to see how far a crashing script got.
The fix: reinstall the package in a fresh environment, with the versions its install page lists for your Python, CUDA driver and CPU. A bigger machine does nothing for this one.
3. A library aborted: conflicting versions
Some libraries check their surroundings and abort when something is wrong. The best-known case is two copies of the OpenMP runtime loaded into one process, reported for years in PyTorch's and XGBoost's issue trackers. The error starts OMP: Error #15 and explains: "This means that multiple copies of the OpenMP runtime have been linked into the program." It offers an escape hatch, setting KMP_DUPLICATE_LIB_OK=TRUE, as "an unsafe, unsupported, undocumented workaround", and warns that it "may cause crashes or silently produce incorrect results".
How to tell: a library's own fatal message in the terminal, often Abort trap: 6 on a Mac, and exit -6 (0xC0000409 on Windows, as our abort gave). A crash that depends on import order is a strong hint.
The fix: one environment per project and one package manager in it. VS Code's guide asks conda users to install with conda install rather than pip. pip check does what its docs say: "Verify installed packages have compatible dependencies."
4. The kernel can't start, so it keeps dying
If the kernel dies before any cell runs and restarts in a loop until "the automatic restart has failed", it is failing at startup: ipykernel isn't installed in that environment, the kernel points at a Python that has moved, or a package it imports at startup is broken. VS Code lists the first as "Kernel fails to start with an error about ipykernel not being installed". The terminal shows the traceback. Install ipykernel in the environment you want and register it, as in our Jupyter install guide, then pick it under Kernel, Change Kernel.
Not a death: an endless loop or a long cell
A cell that shows [*] and never finishes hasn't killed anything: the kernel is busy, and your variables are still there. In our test the kernel was alive after 3 seconds of while True: pass, and an interrupt ended the cell with KeyboardInterrupt. Use the stop button or Kernel, Interrupt. If the cell is inside compiled code, the interrupt can wait: Python's docs warn that "A long-running calculation implemented purely in C (such as regular expression matching on a large body of text) may run uninterrupted for an arbitrary amount of time, regardless of any signals received." Then restart the kernel instead.
Jupyter notebooks for your team.
Start free →Where to look
- The terminal that runs Jupyter. What the kernel prints outside a cell, such as a library's fatal message or a startup traceback, usually lands there, next to the server's restart lines. Start the server with
jupyter lab --debugfor more detail. In VS Code, the crash message links to the Jupyter log in the Output panel. - The system log. On Linux,
dmesgorjournalctl -k, as above. On Windows, Event Viewer, under Windows Logs and Application, can record a crash ofpython.exe; neither of our Windows crashes left an entry there, so an empty log proves nothing. - The same code as a plain script. Copy the cell into a file and run it with
python -X faulthandler, or export the whole notebook withjupyter nbconvert --to script. You get the real traceback and exit code without Jupyter in between; running a notebook from the command line covers the commands. - The exit code.
echo $?in bash or$LASTEXITCODEin PowerShell after the script. 137 means killed (often memory), 139 a segfault, 134 an abort.
Fixes by cause
| Cause | Fix | Does a bigger machine help? |
|---|---|---|
| Out of memory | Smaller dtypes, chunks, delete large objects, load only the columns you need | Yes, when the arithmetic says it will fit |
| Crash in compiled code | Fresh environment, versions that match your Python, CPU and GPU driver | No |
| Conflicting libraries | One environment per project, one package manager | No |
| Kernel can't start | Install and register ipykernel in the right environment |
No |
| Endless loop | Interrupt, then fix the loop | No |
Where Fastero fits
Fastero is an AI and data platform where people and AI agents work together on a team's data. Its notebooks are standard .ipynb files, run in Fastero's editor on a notebook server (JupyterHub on Kubernetes) that nobody on your team has to run, with Python 3.11, pandas, SQLAlchemy, seaborn, psycopg2 and the BigQuery client installed. Each notebook server has 1 CPU and 2 GB as standard, and the fixes above apply there as on any machine.
When the cause is memory and the work genuinely needs more, the Pro plan lets a notebook move to a bigger machine: Medium (2 CPUs, 8 GB) at $0.20 an hour, Large (4 CPUs, 16 GB) at $0.40, or Extra large (8 CPUs, 32 GB) at $0.80, charged by the second from money added to your balance. An hour on 16 GB costs $0.40, not a new laptop. See pricing.
Be clear about what that doesn't fix. If your kernel died from a crash in compiled code, conflicting libraries or a kernel that can't start, a bigger machine changes nothing: fix the environment. And if the arithmetic says the data needs more memory than the machine can hold, chunk it or let the database do the work. In Fastero, a SQL cell runs on a saved connection and hands only its result to Python, as a pandas DataFrame named after the cell.
FAQ
What does "the kernel appears to have died" mean?
The process that runs your notebook's code exited unexpectedly, and Jupyter started a new one. Everything in memory, your variables and imports, is gone, so you need to run the cells again.
Why does my Jupyter kernel keep dying?
Check memory first: the operating system kills a kernel that uses too much, especially on Linux and on hosted Jupyter. If it dies at the same import every time, a package is broken or conflicts with another. If it dies before any cell runs, the kernel can't start at all.
Why does the kernel die when I import TensorFlow or PyTorch?
The crash is in compiled code: an incorrectly installed package, versions that don't match your Python or GPU driver, a CPU without the instructions the package needs, or two copies of the OpenMP runtime. A fresh environment with versions from the package's install page fixes most of these.
How do I know if my kernel ran out of memory?
Watch memory climb before it dies, and check that it died without a traceback. On Linux, dmesg shows a Killed process line naming python, and a script run from the shell exits with 137.
Is a busy kernel the same as a dead one?
No. A busy kernel shows [*] next to the running cell and keeps your variables; interrupt it to stop the cell. A dead kernel has lost everything and shows a restarting or dead status.
Will a bigger machine stop the kernel from dying?
Only when memory is the cause and the data fits in what the bigger machine has. Crashes, version conflicts and kernels that can't start happen on any machine.
Sources
Read and run on 2 December 2026. Our tests used jupyter_client 8.10.0, ipykernel 7.4.0, JupyterLab 4.6.6 and Jupyter Server 2.21.1, on Windows 11 (Python 3.14.3) and in Docker's python:3.14-slim (Python 3.14.10).
- Project Jupyter: JupyterLab notebook panel source, classic notebook messages (nbclassic), jupyter_client restarter, Jupyter Server kernel manager, Running Code example notebook, Zero to JupyterHub: user resources
- VS Code: Kernel crashes, Kernel crashes when using TensorFlow, Kernel crashes when using numpy, message strings
- Python and pip: os.abort, subprocess, faulthandler, signal, pip check
- Linux and Docker: cgroup v2, oom_kill.c, signal(7), Docker resource constraints
- Microsoft: abort, NTSTATUS values
- Libraries: TensorFlow pip install, PyTorch issue 78490 (OpenMP), XGBoost issue 1715 (OpenMP)
Try Fastero free: run notebooks on a server nobody on your team has to look after, and on Pro move one to 8, 16 or 32 GB when memory is what kills it. No credit card required.
Fastero Dev Team