Skip to main content

Project kernels

Hex projects are powered by kernels that run your code and manage compute resources.

What is a kernel?

kernel is a core component of a computer's operating system. It acts as a bridge between the hardware and software, managing compute resources and providing essential services to other parts of the OS and applications.

In Hex, a project kernel is essentially a program that executes your code and manages compute resources for the project. Each project may have multiple kernels to power activities across the Notebook view, Published App, and scheduled runs.

Kernel status and actions

In the Notebook view, the Kernel Status indicator in the lower-right and the Kernel Actions menu next to it can help you monitor and manage the kernel powering your Notebook session.

Kernel status

Notebook kernels are started when you begin a Notebook session by running your project or by restarting your kernel. A yellow "Starting" status will be followed by a green "Running" status to indicate the kernel has started and is running.

Notebook kernels are stopped automatically if they time out. You can manually stop your kernel with the 'Stop' action in the Kernel Status menu. A yellow "Stopping" status will be followed by a red "Stopped" status to indicate the kernel has stopped and is no longer being utilized.

warning

Closing your browser tab or navigating away from your project will not stop your kernel. If you are using an advanced compute profile, you should manually "Stop" your kernel when you are done working.

In some cases, your kernel status may display "Pending", meaning that your user has reached the 25 concurrent kernel limit and the project is waiting for a free kernel. This is most often due to running many projects using the Hex API. See the section below on maximum active kernels to learn more.

Kernel actions

  • Restart will restart the current kernel.
  • Restart and run all will restart the current kernel and re-execute all cells in the project.
  • Run all without cached results will clear the project cache and re-execute all cells in the project using the current kernel.
  • Interrupt will cancel cell execution but will not stop the kernel.
  • Stop will stop the kernel, which terminates compute utilization and erases all stored variables.
  • Clear outputs will clear the outputs from all cells in the project. This action can be useful to free up memory in cases where a particular cell generated a very large output.
warning

Restarting or stopping the kernel will erase the stored value of all python variables. If you have irreplaceable data stored in a python variable that you know cannot be reproduced next time you run the app, you should save that somewhere before restarting or stopping the kernel.

Kernel timeouts

The kernels powering your Hex projects have a limited lifetime, after which they will expire. The lifetime of your kernel depends on 2 factors: how it's being used and which Hex plan your workspace is on.

For workspaces on Professional, Team, or Enterprise plans:

  • Kernels powering Notebook sessions have an idle timeout of 5 hours and a maximum lifetime of 24 hours. This means that your project must be able to run within 24 hours from start to finish, otherwise the kernel will expire and your project execution will be interrupted.
  • Kernels powering published Apps have an idle timeout of 15 minutes. If a user on a published App is inactive for 15 minutes, the kernel powering that App session will expire. A new kernel will start automatically if the user interacts with the published App again after 15 minutes.

For workspaces on the free Community plan:

  • Kernels powering Notebook sessions have an idle timeout of 1 hour and a maximum lifetime of 1 hour.
  • Kernels powering App session have an idle timeout of 5 minutes.

Concurrent active kernel limit

Each Hex user is subject to a maximum of 25 concurrent active kernels. If you hit this limit, you can manually stop active kernels using the steps below.

For workspaces on our free Community edition or a 14-day free trial, we may limit the maximum number of concurrent active kernels available at the workspace level in order to maintain an optimal experience for all Hex users.

If your workspace reaches this limit, you can:

  • Reach out to us! We're happy to remove this new workspace limit after verifying your kernel usage.
  • Follow the below instructions for manually stopping active kernels.
  • Wait until more kernels are available (kernels are automatically stopped after a timeout).
  • Upgrade to a paid plan.

Manually stopping active kernels

To make more kernels immediately available for your workspace or user, you can:

  • Stop active or idle Notebook kernels by clicking "Stop" from the Run all dropdown.
  • Stop active or idle published app kernels by clicking "Stop" from the More menu (3 dots) in the top right corner, or by closing the published app tab or browser window.