- 30 May 2025
- 1 Minute to read
- Print
- DarkLight
Graceful Shutdown
- Updated on 30 May 2025
- 1 Minute to read
- Print
- DarkLight
Overview
Servers can be set to gracefully shut down to prevent the loss of data. The server will shutdown after a specified amount of time. This allows any in-progress Flows, Jobs, or Message Queues to finish running.
Enabling Graceful Shutdown
Graceful shutdown is enabled by modifying the settings.xml file. There are two specific settings that need to be altered. They are typically found at the very end of the settings.xml file.
- AllowGracefulShutdown - this setting needs to be enabled. By default this is set to false.
- TerminationGracePeriodSeconds - by default this is set to 30 seconds. Change this to any amount of time that is appropriate.
- After making the changes, restart the server.
Once these settings are applied, when a user performs an action to shut down or restart the server Decisions will enter Maintenance Mode. All non-admin users will be prevented from starting any new processes. The server will continue running for the total amount of time set in TerminationGracePeriodSeconds, or until there are no more running processes, whichever comes first.
This only needs to be set once. Settings.xml will not revert without manual changes.
These settings also work for containers. In the environmental variables file these settings will be DECISIONS_ALLOWGRACEFULSHUTDOWN and DECISIONS_TERMINATIONGRACEPERIODSECONDS. The grace period for the container must match the regular installation.