Per‑cell execution timeout support in Jupyter
0 reputation · 29 Oct 2025, 06:21 UTC
Goal
Determine whether Jupyter provides a documented mechanism to limit the runtime of an individual notebook cell, and if so, how that limit can be configured and enforced.
Constraints
Current Jupyter releases expose a kernel_timeout parameter that applies only to kernel startup, and there is no standardized cell‑execution timeout in the protocol or in the kernel manager. Front‑end interrupt actions (e.g., the “Interrupt Kernel” button) rely on the kernel’s signal handling and may be ineffective if the kernel is in an uninterruptible state.
Uncertainty
It is unclear whether any Jupyter component (kernel manager, front‑end, or kernel implementation) offers a per‑cell timeout that is both documented and enforceable across different kernel types. Additionally, the interaction between a kernel’s own signal handling and a front‑end‑requested timeout has not been formally specified.
Questions
- Does Jupyter have a documented per‑cell execution timeout setting that can be configured via the kernel manager or front‑end?
- If such a setting does not exist, what is the recommended approach for enforcing a maximum cell runtime across kernels?
- What are the best practices for handling kernels that ignore interrupt signals during long‑running or blocking operations?