Question
· Nov 4, 2021

How to force stop a production

Hello, Complete novice here.

For some reason one of my productions can't be stopped, it only goes to the suspended state. This is an issue because now I'm not able to start any of my other productions. How can I force the suspended production to stop? I have tried Do ##class(Ens.Director).StopProduction() in the terminal, but I get an error the class doesn't exist.

How can I fix this issue?

Product version: IRIS 2021.1
Discussion (4)0
Log in or sign up to continue

Hi Juuso

Are you running the ##class(Ens.Director).StopProduction() in the same namespace where your production is running?

If you are logging into terminal and your default namespace is not the same as the namespace where the production is running then you will get this error especially if your default namespace is "USER" which is not an Ensemble enabled namespace.

use

zn "{namespace_name}" to move to the correct namespace

if you are uncertain of the namespace name then you can call the utility

d ^%CD

It will prompt you for a namespace. Type in ? <enter> and you will be displayed a list of namespaces. Select the namespace you need to be in and then run your code.

Nigel

Thank you for the fast response. Sadly, after starting the production and stopping it I get the same message as I would in the management portal.

AMK>DO ##CLASS(Ens.Director).StartProduction("AMKPKG.FoundationProduction")
 
22:33:24.884:Ens.Director: Production 'AMKPKG.FoundationProduction' starting...
22:33:25.629:Ens.Director: Production 'AMKPKG.FoundationProduction' started.
AMK>DO ##CLASS(Ens.Director).StopProduction()
 
22:33:32.486:Ens.Director: StopProduction initiated.
22:33:32.513:Ens.Director: Queued messages are being saved in the suspended production.
22:33:32.513:Ens.Director: Production 'AMKPKG.FoundationProduction' suspended.

Why does it keep getting suspended and not stopping? 

Juuso

According to this page, if it's something that still in development, you can use the CleanProduction() method to clear the message queues. Using it in a live system isn't recommended because it clears out everything pretty indiscriminately, but it's useful for debugging.

Productions get the suspend status when after shutting down there are still synchronous messages that could not be processed.