> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Project session management

export const Danger = ({children}) => {
  return <div class="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border danger-admonition dark:danger-admonition" data-callout-type="danger">
      <div class="mt-0.5 w-4">
        <svg width="14" height="14" viewBox="0 0 14 14" fill="rgb(239, 68, 68)" xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 text-sky-500" aria-label="Danger">
          <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path>
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

Effective project session management is essential for optimizing resource utilization and ensuring fair access to compute resources in Workbench. As an administrator, you can set thresholds on the number of active sessions a user is allowed to have open simultaneously, preventing any single user from monopolizing resources. Additionally, you can define thresholds for how long sessions are allowed to remain idle—in days and hours—before being automatically terminated by the system. You can also terminate active sessions manually, if necessary.

## Viewing project session settings

To view a list of currently open sessions:

1. Open the <Icon icon="circle-user" iconType="light" /> **My Account** dropdown menu and select *Admin Console*.
2. Select <Icon icon="gear-code" iconType="light" /> **Sessions** from the left-hand navigation.
3. Select the **Settings** tab.

<Note>
  Project session settings cannot be configured from the application UI.
</Note>

## Configuring project session thresholds

Workbench includes either a `values.k3s.yaml` or a `values.byok.*.yaml` (depending on your implementation) file that overrides the default values in the top-level Helm chart. If you are performing your initial configurations, use the example below to add the `idleSessionControl:` and `activeSessionLimit:` sections to the bottom of your file, then continue your environment preparation and installation.

Otherwise, follow the steps for [Setting platform configurations using the Helm chart](./advanced/settings) to add or update the `idleSessionControl:` and `activeSessionLimit:` configurations to the bottom of the `helm_values.yaml` file, as needed for your system setup:

<Accordion title="Session threshold example">
  ```yaml theme={null}
  # Idle session termination control
  idleSessionControl:
    # -- The granularity of the idle time (measured in integer hours).
    # @section -- Idle Session Control
    # -- Idle session expiration threshold (measured in days).
    # @section -- Idle Session Control
    cleanupThreshold: '5 days'

  # -- The maximum number of sessions a user may run concurrently.
  # @section -- Active Session Control
  activeSessionLimit: 15
  ```

  <Note>
    By default, the system is globally configured to limit users to *20 active sessions*, which are allowed to idle for up to *seven days* before being terminated.
  </Note>
</Accordion>

Session management can also be customized per [workload resource profile](/docs/data-science/latest/admin/resources/resource-profile), meaning that you can apply different thresholds to each resource profile if necessary. For example, because GPU resources generally cost more than CPU resources, applying a shorter idle time threshold to the GPU-associated resource profiles can lead to significant cost savings while also ensuring that these resources are available for the users who require them. For more information, see the `GPU with limited idle time threshold example` provided in the resource profile examples.

## Viewing active sessions

To view a list of currently open sessions:

1. Open the <Icon icon="circle-user" iconType="light" /> **My Account** dropdown menu and select *Admin Console*.
2. Select <Icon icon="gear-code" iconType="light" /> **Sessions** from the left-hand navigation.

## Filtering active sessions

Search for projects by name, or use the filter categories efficiently locate project sessions.

<Note>
  * Click on the table headers to sort the displayed sessions.
  * Reselect any filter or click <Icon icon="circle-x" iconType="light" /> **Clear Filters** to remove them and reset the table.
</Note>

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/opbTXGcYjx4zM8zO/images/filtering_sessions.png?fit=max&auto=format&n=opbTXGcYjx4zM8zO&q=85&s=3c43872b6a4403686746ac588f9edf7e" alt="" width="1922" height="765" data-path="images/filtering_sessions.png" />
</Frame>

## Stopping sessions

Stopping a project session terminates the pod running that session, releasing its compute resources back to the cluster. Select the sessions you would like to terminate, then click <Icon icon="circle-stop" iconType="regular" /> **Stop Selected Sessions**.

<Frame>
  <img src="https://mintcdn.com/anaconda-29683c67/u4MsRLDCM8Pedgc_/images/stopping_sessions.gif?s=aac0a55adc3a8855c32a2020c5669a05" alt="" width="1275" height="718" data-path="images/stopping_sessions.gif" />
</Frame>

<Danger>
  If you stop an active project session, anyone using that project will receive a `Directory not found` error and lose all in-progress work.
</Danger>
