Bad code detection
- Last UpdatedApr 24, 2025
- 2 minute read
Note: For information on overriding default configuration settings, refer to Modify configuration settings.
The Application Calculation Engine (ACE) is designed to monitor user code in order to detect problems that may impact the operation of the ACE and other ACE procedures.
If problematic code exists in the user code, the ACE may take longer than usual to run a set of ACE procedure records. If the ACE detects a delay (that is, the user code has run longer than the time value configured in the RUNAWAY_TIMEOUT key), it will shut itself down and disable the ACE Configuration (aceconfig) record that is running the user code that is causing the delay. If several aceconfig records are using the same ACE code (acecode), only the first one detected will be disabled. Subsequent iterations may result in additional aceconfig records being disabled. An alarm and an event are generated every time a record is disabled.
Note: Stopping ACE procedures before they have finished executing may cause problems as the code will not have fully completed its processing.
The ACE will wait up to the time value configured in the SHUTDOWN_TIMEOUT key for the ACE procedures to exit on their own before terminating them. In the event of termination, some database locks may not be removed from the terminated procedures. The ACE handles this bad application state by restarting the entire process. The database locks held by the ACE Process are cleared out by the periodic unlock process when it detects that the ACE has shut down. After the database locks have been removed, the process monitor will restart the ACE.
Note: When the ACE shuts itself down and an alarm is generated, it is recommended to check the oasErrLog to see which routines have been disabled or prematurely terminated due to the suspect code that caused the shutdown.