Terminating a Running Async Process
In some cases, an administrator might want to terminate a long-running batch process. The process might have been inadvertently started, be consuming too many resources, or be suspected of being hung or stuck in a loop.
This procedure works by attempting to interrupt the thread of the JVM that the Async process is running on. However, there is no guarantee that interrupting a thread will actually cause termination. In most cases this will succeed but in cases of blocked execution, it depends on where the thread is blocked and the implementation of the code performing the block. And it is possible that if it is stuck in a tight loop, it might not check the interrupt status of the thread. Checks have been added to several Landmark database-level operations. These operations will check if the current thread is marked as interrupted and throw a exception if this is the case. This will cause the running process to terminate.
The termination of a running Async process depends on the system being able to match the async action trigger to a JVM ID. Although the trigger has a record of the Grid JVM ID that the trigger is being routed to, it is possible that this information is not accurate, such as if the Async node goes down and then is restarted. Therefore, you should determine what the JVM ID is before attempting this procedure.
The node log for the node where the process was running will have an entry showing the interrupt request, and includes the thread name and the actor ID that requested the interrupt.
Terminating should be used with caution. Data can be left in an inconsistent state. Many actions have recovery capability but that relies on the job being restarted and allowing it to complete. Data cleanup is the responsibility of the owner of the data. This should be kept in mind if there is no intent to restart the action and allow it to complete.
-
Get the JVM ID in case you need to supply an alternate value to the one presented when you later select the action to terminate the process.
- Access the Grid Management Pages.
- On the Topology view, click the Management Pages link for the Landmark application.
- Select the tab representing the node for batch execution.
- Navigate to Async Administrator > Async Framework Components > Triggers, and select the trigger whose batch process you want to terminate.
- From the Actions menu, select Request Termination.
- On the form that appears, enter the JVM ID you identified earlier if the last known JVM ID that is displayed is not correct.
- Click OK.