"IRIS can not become quiescent" error

Primary tabs

Did anyone run into this error when stopping a Production from Ens.Director?

Ens.Director::StopProduction => ERROR <Ens>ErrProductionNotQuiescent: IRIS can not become quiescent

It happens sporadically when an automated unit test from a class that extends %UnitTest.TestProduction runs a test on a Business Process. I already increased the parameter MAXWAIT to 30 seconds, but the error still happens.


Hi Igor,

This occur because some Business Host still processing a message or waiting for a response.

You can override the method StopProduction to force the production to stop.

Class br.cjs.test.TestProduction Extends %UnitTest.TestProduction

/// Class name of the production. It must contain the production class name.
Parameter PRODUCTION As %String = "HC.Production"; 

/// Paratmerter used to force stop production by Ens.Director
Parameter FORCESTOPPRODUCTION As %Boolean = 1;

/// Code to run right after the production is started. Used, for example, to call a method that initiates the test.
/// If an error status is returned, the test will be aborted and failed and the production will be stopped.
/// So if a non fatal error occurs, you may invoke ..LogErrors(status,"OnAfterProductionStart()") and return $$$OK.
Method OnAfterProductionStart() As %Status
    #Dim exception As %Exception.General = ""
    #Dim statusCode As %Status = $System.Status.OK()
        // Do Yor Tests
    Catch (exception)
        Set statusCode = exception.AsStatus()
    Return statusCode

Method StopProduction() As %Boolean [ Internal, Private ]
    Do ..GetMacros(.Macro)
    Do $$$LogMessage("Stopping production '"_..#PRODUCTION_"'")
    Set r = $$$AssertStatusOK(##class(Ens.Director).StopProduction(..#MAXWAIT, ..#FORCESTOPPRODUCTION), "Invoking Ens.Director::StopProduction")
    If 'r Quit 0
    Set r = $$$AssertStatusOK(..WaitForState(Macro("eProductionStateStopped")), "Verifying Ensemble state is 'Stopped'")
    If 'r Quit 0
    Quit 1



Is this running on a UNIX/Linux system?

If so I have noticed that if the production timeout is set too low Ensemble will spawn off a lot of jobs to try and clear the queues before it shuts down and this can consume lots of CPU and Memory and the system becomes unresponsive. Try setting the Shut down wait time to 60 seconds