Increase the memory available to the Dashboards
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.
Make sure that the machine has enough free memory for the new value before you increase it.
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
-
Run the following file as administrator:
%PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboards\dashboard-service-monitor.bat -
Open the Java tab and set Maximum memory pool in MB, for example
4096. -
Click OK.
-
Restart the Dashboards Windows service.
Option B - Use the command line
-
Find the name of the Dashboards Windows service: it is the
SERVICE_NAMEvalue in%PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboards\dashboard-service-install.bat. The name has an installation-specific suffix, for examplecast-imaging-dashboards-hdedsd. -
Open a command prompt as administrator in the
amd64subfolder of%PROGRAMFILES%\CAST\Imaging\CAST-Imaging-Dashboardsand run the following command, replacing<service-name>with the name of the service:dashboard-service.exe update <service-name> --JvmMx 4096 -
Restart the Dashboards Windows service.
If you reinstall the Dashboards Windows service with dashboard-service-install.bat, for example when you upgrade Java, the service takes the --JvmMx value from the batch file again. Set the value again after the reinstall, or update --JvmMx in the batch file before you run it.
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