Execution stops when a SimApi returns an error (Q829)
On a SIMCA-online server with batch configurations;
- Active batches are abruptly ended. Future batches are not picked up.
- In the Project Administration window, execution has been turned off for configuration where there were active batches without anyone having clicked the stop-button.
- A notification message is displayed on the client saying "Project configuration [ID] execution aborted".
- The server log has [Error] entries with the text "Status code: SIMAPI2_STATUS_ERROR" followed by a ViewClientDB::SendMessageToAllClients() with the same message as is displayed on the client.
Note: Continuous configurations are not affected by this issue. They simply get no values when a SimApi returns error which results in observations with missing data, but configuration execution is not stopped.
SIMCA-online reads control data through SimApis as part of configuration execution for each observation. Control data are data for the batch id tag and tags used in phase conditions and sleep conditions. The server evaluates the control data to determine how a phase model should execute.
If the SimApi returns an error code to SIMCA-online, it will handle this by stopping execution of the configuration that was executing. This is an unintentional change from SIMCA-Batch On-Line 3.4 which did not stop execution in this case.
Start execution manually in Project Administration by clicking the green play-button for affected configurations. The configurations will then start execution and catch-up data and new batches will show up.
This problem can happen if there are networking problems between the SIMCA-online server and the data source. Thus finding and fixing any networking issues can help reduce the likelihood of SimApi errors stopping execution as described in this knowledge base article.
The fix changes the behavior as follows when a SimApi error occurs:
- A SimApi error no longer results in execution being stopped for batch configurations. Instead the server gets no values (missing values).
- At a later time when the SimApi no longer returns error, a new phases or batches can be picked up by SIMCA-online.
- All connected clients receive a notification that "The server failed to communicate with a data source. Review the server log for details.". This notification is only displayed at most once per minute (this prevents the client from constantly displaying notifications for a persistent SimApi problem).
The following aspects of the SIMCA-online execution algorithm remain as before:
- Missing values returned by the SimApi will result in the phase ending.
- If a SimApi returns errors as a result of the server having lost connection to the data source you may have to restart the SIMCA-online server servers to get the SimApi to work. If you need to do this depends on which SimApi you are using. Some SimApis can gracefully re-establish the connection to the data source. This feature is called Connection resiliency and is described on the SimApi page.
For full details on the SIMCA-online execution algorithm, see chapter 6 in the SIMCA-online Technical Guide.