Starting and Stopping Productions
By default, InterSystems IRIS® data platform does not automatically start productions. This topic describes how to start and stop productions. In order to start or stop a production you need USE permission on %Ens_ProductionRun.
For a live, deployed production, InterSystems recommends that you use the auto-start option. The other options are intended primarily for use during development.
Task | Privilege Needed |
---|---|
Access Interoperability menus in Management Portal |
|
Start or Stop a Production |
|
Manage Relative Startup Priority |
|
Manage Deployment and Create Deployment Packages |
|
Starting a Production
To start a production from the Management Portal:
-
Select Interoperability > List > Productions.
InterSystems IRIS then displays the Production List page.
-
Select the production that you want to start.
-
Select Open.
InterSystems IRIS displays the production.
-
Select Start.
-
Select OK. InterSystems IRIS displays a dialog box that indicates progress.
Note:If any Terminal windows open as a result of starting the production, do not close them.
-
When the dialog box shows it is Done, select OK.
You can stop the running production and start another one from this page. Only one of these productions can run at a time in a given namespace. If you try to start one, and another is already started, a warning message displays and nothing changes. For example:
12:05:06.292:Ens.Director: ERROR <Ens>ErrProductionAlreadyRunning: Production 'Demo.Loan.FindRateProduction' is already running 12:05:06.352:Ens.Director: ERROR <Ens>ErrProductionAlreadyRunning: Production 'Demo.Loan.FindRateProduction' is already running Production 'Demo.Loan.BankUSProduction' not started: ERROR <Ens>ErrProductionAlreadyRunning: Production 'Demo.Loan.FindRateProduction' is already running
Stopping a Production
To stop a production from the Management Portal:
-
Select Interoperability > List > Productions.
InterSystems IRIS then displays the Production List page.
-
Select the production that you want to stop. This must be a production that is running.
-
Select Open.
InterSystems IRIS displays the production.
-
Select Stop.
-
Select OK. InterSystems IRIS displays a dialog box that indicates progress.
Note:If any Terminal windows open as a result of starting the production, do not close them.
-
When the dialog box shows it is Done, select OK.
-
If the request to stop the production initially fails, the portal displays a message:
“Production could not stop, do you want to force a shut down?”
And provides a command:
Yes - Force to Shut Down
If you click this command, the production is forced to shut down.
If a production is Suspended or Troubled, see Correcting Production Problem States.
Managing Production Auto-Start
You can specify that a production is automatically started in a namespace at system startup, and is automatically stopped at system shutdown. This option is the recommended way to start and stop productions.
If you have access to all namespaces, you can assign a Relative Startup Priority to an auto-start production. When the system starts up, the production with the highest priority number starts first, regardless of its namespace. If two productions share a priority number, the alphabetical order of the productions’ namespaces determines which production starts first. You cannot set a Relative Startup Priority if you do not have access to all namespaces.
To access this page in the Management Portal, select Interoperability > Manage > Auto-Start Production.
To enable auto-start for a single production in the current namespace:
-
Select the production from the drop-down list.
-
If you have access to all namespaces, set the Relative Startup Priority. Productions with the highest number start first.
-
Click Apply.
InterSystems IRIS displays a dialog asking you to confirm that you want to auto-start this production.
To disable auto-start in the current namespace:
-
Do not select any productions from the drop-down list.
-
Click Apply.
InterSystems IRIS displays a dialog box asking you to confirm that you do not want to auto-start any production in this namespace.
A different page lets you override auto-start for all productions.
If you define a production to auto-start in a mirror configuration, it automatically starts on the current primary node in a failover situation. No further action is necessary. For details on the mirror failover process, see Mirroring.
Overriding the Production Auto-Start Options in All Namespaces
For debugging purposes or during disaster recovery, you can override the auto-start options for all productions. To do so:
-
In the Management Portal, select System Administration >Configuration > Additional Settings > Startup.
The Startup Settings page appears.
-
Select Edit next to the EnsembleAutoStart setting.
-
Clear the check box.
-
Click Save.
InterSystems IRIS subsequently disregards the namespace-specific settings in the Auto-Start Production page, which is described in the previous section. In other words, even if a production appears in the Startup sequence priorities for productions set to Auto-Start list for a given namespace, the system does not automatically restart the production.
Improving Restarts for Productions with Large Queues
By default, when a production is stopped, any asynchronous messages on the ^Ens.Queue global queue are moved to the ^Ens.Suspended queue. When the production is restarted, they are moved back. For productions with many messages in the queue, this can slow down the process of stopping and restarting a production. To avoid moving the messages, you can set the following ^Ens.Configuration global node:
set ^Ens.Configuration("Queues","KeepInQueues")=1
By default, the node is set to 0; you will have to change this for each namespace. This will prevent the messages from being moved out of the Ens.Queue global, which can improve restart speeds on productions which consistently have large queues.
Using Production Shutdown Groups
Production shutdown groups allow you to control the order in which productions are stopped when you shut down an instance. By default, all productions are shut down in parallel when you stop an instance. When productions are organized into production shutdown groups, InterSystems shuts down the first group of productions before starting to shut down productions in the next group. Each group name must be an integer, and InterSystems starts shutting down the lowest group number first. By default, all productions belong to group 2.
To add a production to a production shutdown group:
-
Select the production’s namespace and then go to Interoperability > Manage > Configuration > Production Shutdown Groups.
-
Select the production from the drop-down list.
-
Enter the group’s number in Relative Shutdown Group.
-
Select Apply.
The table at the bottom of the page displays the productions that are currently active in each namespace, along with their group number. You can assign a production to a group at any time, but it does not appear in the bottom table unless it is the active production, which means it is running or is the most recently stopped production in the namespace.
Using production shutdown groups can result in it taking longer for the instance to stop, which has implications for time-sensitive failovers.