AAI Scheduler Deletion Process is Slow or Hangs
search cancel

AAI Scheduler Deletion Process is Slow or Hangs

book

Article ID: 440743

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

When deleting a scheduler in Automation Analytics & Intelligence (AAI), the process may appear to hang or take several days to complete. In the AAI logs, the DeleteSchedulerHelper may show it is stuck on specific steps, such as Step 3 (JobRunPredJobRun) or Step 13 (JobRun). Additionally, if the AAI server is restarted or rebooted during this process, the deletion will roll back, requiring the process to start over.

Environment

AAI 24.0

Cause

  • Large Data Volume: Tables like JobRun_PredJobRun and JobRun are often the largest in the AAI database. Deleting millions of rows from these tables is a resource-intensive operation Determine Scheduler Delete Status.
  • Database Performance: Index fragmentation, stale database statistics, or blocking sessions can significantly slow down DELETE statements Determine Scheduler Delete Status.
  • Process Interruptions: Restarts of the AAI service during a deletion trigger a rollback of the database transaction, losing all progress made up to that point Determine Scheduler Delete Status.

Resolution

1. Monitor Progress

You can monitor the progress of the deletion by checking the row counts of the large tables for the specific scheduler. 

The jaws.log will show messages with which step is is currently working on and the associated table like below:

INFO [DeleteSchedulerHelper] Step 3>Deleting JobRunPredJobRun


You can query the associated table and filter by the Scheduler Name to see the progress.

 

Below is the list of all steps that AAI must get through to finish a scheduler deletion.

Deletion Sequence

StepTarget EntityAction
1JobConditionUPDATE
2JobStreamRun_JobRunDELETE (×2)
3JobRun_PredJobRunDELETE (×2)
4AlertDELETE
5AlertDELETE
6TempEventDELETE
7DuplicateEoidsDELETE
8JobStreamAverageDELETE
9SLAConditionDELETE
10JobStreamSLADELETE
11JobStreamRunDELETE
12UnresolvedJobRunCausedByDELETE
13JobRunDELETE
14JobStatisticsModelAttrDELETE
15JobStatisticsModelDELETE
16JawsJobAverageDELETE
17TrendDetailDELETE
18RecentStateTypeDELETE
19AlertActivation_DistTypeDELETE
20AlertActivationDELETE
21JobCondConj_JobCondDELETE
22JobConditionDELETE
23GlobalVariableDELETE
24JobStream_StartJobDELETE (×2)
25JobStream_JobDELETE (×2)
26PredictedDurationDELETE
27JobPropertyDELETE
28JobTriggerDateDELETE
29JobTriggerDELETE
30CalendarPatternDELETE
31JawsCalendarDELETE
32BusinessDomain_JobStreamDELETE
33JobStreamPerformanceDELETE
34JobStreamDELETE
35CandidateDELETE
36CrossInstanceJobConditionDELETE
37JobEventDELETE
38RecommendedStartTimeDELETE
39UniversalJobPropertiesDELETE
40JawsJobDELETE
41JawsResourceDELETE
42JawsJobTypeDELETE
43JawsMachineMetadataDELETE
44JawsMachineDELETE
45UniversalResourceHistoryDELETE
46UniversalResourceActionDELETE
47UniversalResourceDELETE
48CrossInstanceReferenceUPDATE then DELETE
49WCCAutosysServerUPDATE (×2)
50WaitingRoomEventDELETE
51CrossSchedulerResolutionInfoDELETE then UPDATE
52JobSchedulerDELETE

DBA Action Items

It would be worth having your DBA check the following three items. (Note: You will need DBA-level rights to run these queries. If you get a message like "Table or View does not exist", it is a permissions issue.)

1. Check for index fragmentation

Run this periodically to confirm the count is decreasing Determine Scheduler Delete Status.

2. Database Maintenance

Have a Database Administrator (DBA) perform the following checks to ensure optimal performance:

  • Index Fragmentation: Check the health of indexes for AAI tables and rebuild them if fragmented Determine Scheduler Delete Status.
  • Stale Statistics: Ensure that database statistics are up to date. Stale statistics can cause the Oracle optimizer to choose inefficient execution plans Determine Scheduler Delete Status.
  • Blocking Sessions: Check for other database sessions that might be blocking the AAI deletion process Determine Scheduler Delete Status.

3. Best Practices

  • Set Scheduler Offline: Before starting the deletion process, set the scheduler to Offline to prevent new data from being processed while the system is trying to delete existing data Determine Scheduler Delete Status.
  • Avoid Restarts: Ensure that no maintenance tasks or automated reboots will interrupt the AAI service during the deletion window Determine Scheduler Delete Status.