Stopping runaway Shuffle workflows

When a Shuffle playbook loops or floods the queue, you need to stop it fast, clear what is waiting, and keep it from returning. This page explains the safe sequence and the guards to build.

On this page

Why Shuffle workflows run away and how to stop them safely

A looping or flooding Shuffle workflow keeps creating executions, consuming worker capacity and spending downstream API quota until someone halts it. The safe first step is to stop new runs of the offending workflow, then drain or clear the queue, and only then fix the loop, because each fix attempted while runs keep arriving makes the backlog harder to reason about. This page covers those stop actions, the API calls behind them, and the guards that keep a loop from returning.

The moving parts explain why a loop spreads so quickly. A workflow is the saved playbook, and every trigger or manual start creates an execution record in OpenSearch, which the Go backend API on port 5001 serves. Orborus, the runtime component, polls the backend for jobs, starts a worker for each workflow execution, and that worker starts the app containers each action needs. A loop therefore shows up in three places at once: execution records growing in OpenSearch, worker containers multiplying on the Orborus hosts, and repeated outbound calls from app containers to the systems the playbook talks to.

Before you act, decide whether this is a runaway or a stuck execution. The sibling page on stuck executions covers runs that are waiting or hanging with little activity, where the cause is usually Orborus state, reachability or concurrency limits. Use this page when the count of runs is rising, the same actions repeat, or a downstream system reports unusual traffic from your Shuffle host. Confirm with your own team which identity owns each workflow, which downstream APIs carry quotas, and who may approve halting a production playbook, because those answers decide how fast you can stop it. Record every stop action with the workflow ID, the time and the reason so the fix can be reviewed later.

The safe order for halting a flood of executions

This sequence stops new work from entering Shuffle first, then clears what is already running, so the environment queue can drain without new executions refilling it. Each step ends with a check that tells the operator whether to continue.

  1. Confirm the scope of the flood

    Identify which workflow, trigger source or environment is generating the executions before changing anything. Check the workflow list and recent execution history in the Shuffle UI, and note the workflow IDs, the environment names and the trigger type (webhook, schedule or app-based trigger). Record the count of queued and running executions so you can compare it after each later step. The step is done when you can name the source of the flood and the environment it affects.

  2. Stop new triggers at the source

    Disable the trigger that starts the runaway workflow, or pause the workflow itself, so no new executions are created. Do this first because aborting runs while a trigger keeps firing only creates more work. Confirm the change in the UI and check the trigger's source system as well, since a webhook or schedule upstream may keep sending events. The step is done when the execution count stops rising over a short observation window.

  3. Abort in-flight executions for the workflow

    Abort the executions that are still running for the affected workflow. Confirm the exact API calls and endpoints for the installed version against the Shuffle configuration and API documentation before you run anything, because the routes and parameters can change between releases. Use a read-only list call first to capture the execution IDs, then abort them in a controlled batch. The step is done when the list call returns no running executions for that workflow.

  4. Clear the environment queue

    Clear the queued executions held for the affected environment so that work waiting for an Orborus worker does not start after the abort. Confirm the queue-clearing method for your version in the Shuffle configuration and API documentation, and take a note of the queue length first. Clear only the environment that the flood belongs to, so healthy environments keep running. The step is done when the queue count for that environment reads zero.

  5. Verify the queue is draining

    Watch the queue and running execution counts for the environment over a short period and confirm they stay at zero or fall steadily. If the count rises again, a trigger or upstream system is still sending work, so return to the trigger step. Check the Orborus logs for the environment to confirm it is picking up no stale jobs. The step is done when the queue stays empty across repeated checks and no new executions appear from the source.

  6. Document the cause before re-enabling

    Record the workflow ID, the trigger that caused the loop, the times of the flood and the execution IDs you aborted. Identify the loop condition, such as a trigger that fires on the workflow's own output or a retry with no limit, and fix it in a test environment first. Re-enable the trigger only after the fix is tested and the guards described in the next section are in place. The step is done when the fix is reviewed and the change record is saved.

Choosing between clearing the queue and aborting one workflow

When a single workflow is looping or flooding, the narrowest effective action is usually to abort that workflow's executions. This stops new actions from that playbook while other automations keep their place in the queue. Identify the workflow ID and the trigger that starts it first, because the source of the loop often sits there and will restart the flood if left running.

  • Scope of the action: Aborting affects only the executions of that workflow, so other playbooks on the same environment are not interrupted.
  • Trigger first: Pause the trigger, such as a webhook or schedule, before aborting, or new executions can start straight after you stop the old ones. Confirm how your version handles this.
  • Records left behind: Aborted executions remain in OpenSearch with their status, step results and timestamps, which is the evidence the incident review will need.
  • Side effects already sent: Actions that reached a connected tool, such as a ticket update or an indicator block, may have completed. Check the target system directly.

Before closing the incident, confirm in the execution history that no new runs of the workflow start after the abort.

Which containment control fits which runaway pattern

This table compares five containment controls by the runaway pattern each one fits, what it leaves running, and what to confirm before you use it. Read it by matching your symptom to the first column, then checking the last two columns before acting, because several controls stop new work without stopping work already in flight.

ControlWhen it fitsWhat it does not stopWhat to confirm first
Disable the trigger or scheduleA webhook, schedule or feed is creating new runs faster than you can handleExecutions already queued or running, and manual runs started from the editorEvery trigger that starts the workflow, including webhooks called by other tools and subflows that call it
Abort a single executionOne run is looping, hanging or consuming resources while others are healthyOther runs of the same workflow, and the trigger that will start the next runThe execution ID, and whether the run is inside a loop that will restart it when a child step completes
Abort all runs of a workflow through the APIA workflow has many runs in flight and you need them stopped togetherNew runs started after the abort, and runs that a different workflow already startedThe API key scope, the workflow ID, and the abort endpoint for your Shuffle version in the configuration or API docs
Clear an environment queueJobs are backing up in one runtime environment and blocking unrelated workflowsWork already executing on a worker, and workflows assigned to other environmentsThat the environment name is correct, that no critical workflow is waiting in the queue, and what the queued jobs will do when cleared
Restrict the runtime environmentA workflow must not reach certain apps, networks or hosts while you investigateLogic loops inside the workflow itself, and actions that do not need the restricted environmentWhich Orborus nodes and app containers serve the environment, and whether restricting it also blocks executions you need to finish

How triggers, the backend, Orborus and app containers carry a flood

A flood usually starts at a trigger or webhook source that keeps sending events, and each event becomes an execution stored in OpenSearch by the Shuffle backend. Orborus polls the backend for jobs, starts a worker for each execution, and the worker starts app containers that call downstream systems, so one looping workflow multiplies load at every hop. The diagram marks the four points where containment applies: the trigger, the backend abort, the queue clear and runtime limits. Check each point in order when you contain an incident.

Where a flood enters Shuffle and where each containment control applies.

Guards that stop loops from returning

Stopping a runaway run is only half the job. The other half is designing workflows so the same loop cannot start again, and the most effective guards sit in the playbook logic itself. Every loop needs an explicit termination condition that is tested against real data, plus a hard maximum iteration count so that an unexpected input shape cannot keep a run going indefinitely. Treat the iteration cap as a safety net, not the primary control: a loop that reaches its cap has already consumed runs, worker capacity and downstream quota. Loop and subflow design is covered in depth on the Shuffle workflow development page, so this section focuses on the guards that protect the environment around those designs.

Flooding usually starts upstream, so the next guards belong at the entry point. Deduplicate incoming alerts before they trigger a workflow, using a stable identifier from the source system, and give each triggered action an idempotency key so that a retried call cannot create a second ticket, block or notification. Rate limits toward downstream APIs matter just as much, because a workflow that runs correctly but calls a vendor API thousands of times will still get your credentials throttled or disabled. Confirm which of these controls each app supports before you rely on it, and check the vendor's documented quotas for the APIs you call, since Shuffle does not set them for you.

Finally, guards depend on governance. Adopt naming rules that make a workflow's purpose and owner obvious from its title, and require that every change to a workflow touching high-volume triggers goes through review by someone other than its author. Record the owner, the expected trigger rate and the maximum run count in the workflow description so responders can judge a flood quickly. Keep a current export of each production workflow in version control, so a risky edit can be compared and rolled back. Ask your team to confirm how workflow versioning and export work in the release you run, because the exact steps depend on your Shuffle version and deployment.

Five guard patterns to build into every high-volume playbook

Runaway executions usually come from a small set of causes: a trigger firing repeatedly, a loop with no exit, a failing app called in a tight retry, or a sudden volume spike nobody sees. Each pattern below targets one of these causes, so a single fault stays contained and an operator can stop the damage quickly.

Trigger deduplication

A webhook or schedule that fires on every update can create one execution per event, and a burst of duplicate alerts can flood the queue within minutes. Add a deduplication key built from a stable field such as the alert ID, and reject or merge repeats before the first action runs. Test it by replaying the same payload three times and confirming only one execution starts and the others are recorded as skipped.

Shuffle architecture docs

Loop caps on iterations

Loops over lists that grow during the run, or subflows that call themselves, can repeat without end. Set a maximum iteration count in a variable checked at the top of each loop, and route to an error branch when it is reached. Test with an input list longer than the cap and with a deliberately recursive subflow to confirm the run stops and reports the reason.

Circuit breakers on app calls

When a downstream API is down or rate limiting, every execution retries it and the queue fills with waiting runs. Track consecutive failures in a stored counter, and when the count passes a threshold, skip the call and send a single notification instead. Test by pointing the app at a failing endpoint and verifying that calls stop after the threshold and resume once the counter is reset.

Concurrency limits per workflow

Without a limit, one noisy workflow can occupy every worker and starve the others. Decide the maximum number of parallel executions each workflow may hold, and confirm how your Orborus concurrency settings and runtime capacity enforce it on your deployment. Test by sending a burst larger than the limit and checking that excess runs queue predictably rather than exhausting CPU on the runtime host.

Volume alerts and a kill procedure

Guards inside a workflow cannot catch every fault, so watch execution volume from outside it. Alert when the count of executions per workflow exceeds the normal range for a window, and keep a written procedure that names who may abort runs, how to list them through the API, and how to clear a queue. Rehearse the procedure in a test environment and time how long the operator needs to halt a flood.

Questions teams ask before a runaway workflow incident

How long does containing a runaway Shuffle workflow usually take?

The time depends mostly on how the flood was triggered, how many executions are queued and whether the runaway loop has already written data to other systems. A workflow that a single trigger started can often be stopped in one pass once its ID and execution queue are identified. A loop fed by an external source, such as a webhook that keeps firing, takes longer because the source must be silenced as well as the executions. Ask any partner to explain which steps they would take first, which checks confirm the flood has stopped, and how they would verify that no downstream app actions ran more than once. Because Shuffle counts only app runs that actually execute, the number of runs is also a practical measure of how much damage has occurred, which helps size the cleanup.

Can our internal team handle a runaway workflow without outside help?

Yes, if the team has administrator access to the Shuffle backend, can call its API with an authorized key, knows which workflow owns the flood and has read access to logs. Many teams can stop a single execution quickly. The harder part is the follow-up: confirming that every queued run was aborted, checking for side effects in ticketing, email or endpoint apps, and deciding whether the workflow should be disabled or rewritten before it runs again. Teams without a SOAR specialist on call often benefit from a written runbook and a tested procedure, which a partner can help prepare without taking over the live incident.

What access and environment does the work require from our team?

Plan for four things. First, administrator credentials for the Shuffle frontend and an API key with rights to list and abort executions. Second, shell or orchestration access to the host running the stack, whether Docker Compose, Swarm or Kubernetes, so the team can read container logs and inspect the Orborus runtime. Third, a change window agreed with the security operations and workflow owners, because pausing a workflow affects live detections. Fourth, a test environment that mirrors the production workflow and app set, so that guard rules and queue handling can be rehearsed before they go live. Confirm with your own change process whether emergency changes need separate approval.

What does a partner scope and charge for in a runaway workflow engagement?

A partner's scope usually covers four parts: an incident response procedure for stopping executions, a review of the workflow that caused the flood, guards that stop loops from recurring, and a runbook your team can use later. Fees follow from that written scope, so the main cost drivers are the number of workflows and apps involved, whether the environment is a single server or a multi-node cluster, how much cleanup of downstream systems is needed, and how many environments must be tested. DeployOpen does not publish a price list; a quote follows from the written scope. Ask for the deliverables, the testing steps and the assumptions about access before you compare quotes.

Does preventing runaway workflows require ongoing work?

Some of it is one-time and some recurs. The one-time work is designing the guards, such as loop limits, execution counters and a documented kill procedure, and writing the runbook. The recurring work is reviewing new and changed workflows, testing the procedure after each Shuffle upgrade, and keeping app versions and the team's contact list current. Shuffle releases move quickly, so a guard that works on one version should be retested after an upgrade. Ongoing support, upgrades and continuous testing are available as retainers, which is one option if your team does not want to own this review internally.

How do we prepare a runbook before a runaway workflow happens?

Write the runbook while the platform is calm, then test it in a non-production environment. Include who can declare an incident, how to identify the workflow ID and its execution count, how to abort queued runs through the API and where to confirm the result, how to disable the trigger that feeds the loop, and how to check downstream systems for duplicate actions. Record the API endpoints and keys' location in your secrets store, not in the document itself. Add a rollback step for restoring the workflow after the fix. Review the runbook after each Shuffle upgrade, and run a tabletop exercise with the people who would act during an incident. Check any backup or restore steps against your own backup procedure before you rely on them.

Which parts of a runaway workflow fix can break other automations?

Stopping executions is usually safe, but changes to triggers, shared subflows and loop logic can affect other playbooks. A guard that limits iterations may cut off legitimate high-volume alerts if the threshold is set too low, so test it against realistic input volumes. Disabling a shared trigger can silence detections owned by another team. Before changing anything, list every workflow that calls the affected subflow or trigger, notify the owners, and record the change so it can be reversed. Use a test environment with copies of the workflows to confirm that normal cases still complete.

How to rehearse the kill procedure before you need it

Rehearse the kill procedure in a non-production Shuffle instance before an incident forces you to run it live. The point of the rehearsal is to prove that the commands in your runbook work against your version, your Orborus setup and your credentials, and to record how long each step actually takes. Build a deliberately looping test workflow that triggers itself or a trigger that floods the queue, then run the steps from the runbook exactly as written: clear the environment queue, abort the runs of the test workflow through the API, and confirm the executions reach a stopped state. Keep a copy of the exact commands with the API key scope used, the Shuffle version and the Docker tag, because the rehearsal is only evidence for the environment it was run in.

Record timings and observations as you go. Note the time from the decision to stop until the queue reports empty, how many executions were still running at each check, whether Orborus began new workers after the abort, and any errors returned by the API. Confirm that each guard you rely on actually trips: a loop limit, a maximum run count, a schedule that is paused or a trigger that is disabled. If a guard does not trip in the test, treat that as a finding and fix the workflow design before relying on it. Confirm with your own environment's monitoring that the health and queue signals you plan to watch show what you expect during the test, since the signals are the only way an on-call engineer will know the flood has stopped.

Retain the rehearsal notes with the change record for the Shuffle environment: the runbook version, the test workflow definition, the commands, the observed timings, the guard results and the names of the people who ran it. Repeat the rehearsal after any Shuffle upgrade, Orborus change or change to the API key permissions, because each of those can alter the steps. Ask your team to confirm, before the rehearsal, who holds the authority to run the stop procedure in production and who must be told when it is run.

How DeployOpen scopes and supports runaway workflow containment

DeployOpen approaches runaway Shuffle workflow containment as a planned piece of work on infrastructure you control. We start from your environment, your workflows and your execution limits, then agree the containment design, tests and runbook in writing before anything changes.

How we scope

  • Inventory the workflows, triggers and schedules that could loop or flood the environment
  • Record how your Shuffle runtime, queue and execution data are currently deployed and monitored
  • Agree in writing which guards, runbooks and tests are included before work starts
  • Engagements are fixed-scope, with deliverables and timelines confirmed in the written scope

How we build

  • Design loop guards, execution limits and trigger safeguards for each affected workflow
  • Build and test containment steps in a non-production Shuffle environment first
  • Reproduce runaway cases with controlled test triggers to confirm guards stop them
  • Keep changes versioned so every guard can be reviewed and rolled back

How we hand over

  • Document the queue clearing and API abort procedure with exact commands for your environment
  • Write the guard configuration, owners and the conditions that trigger each step
  • Walk your operations team through the runbook and record the rehearsal results
  • Deliver a retest summary showing the containment steps work as documented

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer
  • Review guard coverage again after new workflows, apps or Shuffle upgrades are introduced
  • Confirm with your team which support scope and response arrangements apply to your environment
  • Agree quotes from the written scope, with no fixed price list to rely on

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.