discovery.canceled event triggered twice for cloud resource discovery schedule with invalid MID Server causing scheduler saturationIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Discovery schedules generate duplicate discovery.canceled and discovery.complete events for a single discovery execution when the configured MID Server is unavailable or invalid in the instance. Both events trigger the "run next" logic on chained schedules, causing exponential growth of jobs in the sys_trigger table. Over time, the scheduler becomes fully saturated, blocking other scheduled jobs, Flow Designer executions, and general system processing. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Yokohama and later Cause<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } When Discovery initiates and the configured MID Server is not available, the StartDiscovery Script Include calls _cancelDiscoveryAndLogError() to cancel the execution. However, because the method call is not followed by a return statement, execution continues after the cancel, allowing the discovery completion path to also fire. This results in both a discovery.canceled and a discovery.complete event being generated for the same execution status. Both events independently invoke the "run next" scheduling logic. On instances where discovery schedules are configured in a cyclic or "Run After" chain, each duplicate event creates a new child execution in sys_trigger. Because each of those executions also fails immediately (due to the same unavailable MID Server), the cycle repeats, producing exponential growth in the scheduler queue until all worker threads are occupied and no other work can proceed. Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Important: Complete Steps 1 and 2 before applying the code fix in Step 3. Clearing the backlog first ensures the system can process events normally after the fix is applied. Test this change on a non-production instance before applying to production. Part 1 — Stabilize the instance by draining the backlog 1. Deactivate all Discovery schedules to prevent new jobs from being generated while the backlog is cleared. Set the Active field tofalseon each affected schedule. 2. Navigate to Sys Trigger(sys_trigger_list.do) and filter for records where Name containsDiscovery. Set the State of all matching records toPermanent Error. This prevents queued cancel jobs from executing and stops new child triggers from being created. 3. Navigate to the event queue (sysevent_list.do) and filter for records where Names tarts withdiscovery.canceledORdiscovery.completedANDStateis notprocessed. Set the State of all matching records to Errort o clear the pending event backlog. Part 2 — Apply the workaround code fix [ Update set available in PRB ] 1. Navigate toSystem Definition > Script Includes and open theStartDiscoveryScript Include. 2. Locate the MID Server validation block. Change the existing code from: if (!new CloudResourceDiscoveryUtil().validateMIDCondition(this.schedule.sysID)) this._cancelDiscoveryAndLogError(); to: if (!new CloudResourceDiscoveryUtil().validateMIDCondition(this.schedule.sysID)){ this._cancelDiscoveryAndLogError(); return; } 3. The addition of thereturnstatement ensures that execution halts immediately after the discovery is canceled, preventing the completion path from firing and generating duplicate events. 4. Save the Script Include. 5. Re-activate the Discovery schedules that were deactivated in Part 1, Step 1, and confirm that each discovery execution now generates only a single cancel event. Note: This workaround addresses the immediate duplicate event condition. A permanent platform fix is being tracked under PRB1986211. Monitor that problem record for patch availability and apply the official fix when it becomes available for your release. Cleaning up sys_trigger records with Permanent Error state: Records in the sys_trigger table that remain in a Permanent Error state after the cleanup steps above will not be re-executed and do not impact system performance. The system removes these records over time as part of standard maintenance. If manual removal is preferred, a one-time Table Cleanup rule can be configured targeting sys_trigger records with state = Permanent Error, and then removed after execution. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Discovery Schedules MID Server Overview