Increase the memory available to the Dashboards

Set the maximum Java heap of the CAST Imaging Dashboards service on Microsoft Windows and Linux via Docker/Podman

Overview

The CAST Imaging Dashboards service is a Java application. When its maximum heap is too small for your applications, the service can run out of memory and stop responding, for example when a job updates the Dashboards at the end of a snapshot. This page explains how to increase the maximum heap.

Default maximum heap

Platform Default maximum heap Set by
Microsoft Windows 1024 MB The --JvmMx option in dashboard-service-install.bat, applied when the Windows service is installed
Linux via Docker/Podman ¼ of the memory available to the dashboards container Java, automatically: the container starts Java without a maximum heap setting

With the default settings, a Linux installation usually gives the Dashboards several times more heap than a Microsoft Windows installation.

Microsoft Windows

The maximum heap is a setting of the Dashboards Windows service (JvmMx). JvmMs is only the initial heap and does not need to change. Editing dashboard-service-install.bat has no effect on a service that is already installed: use one of the following options instead.

Option A - Use the service monitor

  1. Run the following file as administrator:

    %PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboards\dashboard-service-monitor.bat
    
  2. Open the Java tab and set Maximum memory pool in MB, for example 4096.

  3. Click OK.

  4. Restart the Dashboards Windows service.

Option B - Use the command line

  1. Find the name of the Dashboards Windows service: it is the SERVICE_NAME value in %PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboards\dashboard-service-install.bat. The name has an installation-specific suffix, for example cast-imaging-dashboards-hdedsd.

  2. Open a command prompt as administrator in the amd64 subfolder of %PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboards and run the following command, replacing <service-name> with the name of the service:

    dashboard-service.exe update <service-name> --JvmMx 4096
    
  3. Restart the Dashboards Windows service.

Linux via Docker/Podman

Step 1 - Set the maximum heap

Edit or create the following file - see Managing docker-compose.yml files for guidance:

/opt/cast/installation/imaging-dashboards/docker-compose.override.yml

Add the JAVA_TOOL_OPTIONS environment variable to the dashboards service, for example to set a maximum heap of 4 GB:

services:
  dashboards:
    environment:
      JAVA_TOOL_OPTIONS: "-Xmx4g"

Step 2 - Recreate the container

$ cd /opt/cast/installation/imaging-dashboards
$ sudo docker compose up -d dashboards

Step 3 - Check the new value

$ sudo docker logs dashboards 2>&1 | grep JAVA_TOOL_OPTIONS

The log shows the value that Java picked up:

Picked up JAVA_TOOL_OPTIONS: -Xmx4g