Skip to main content

Concurrency Control

Concurrency control decides how many copies of the same automation can run at the same time.

It protects your systems from being overloaded and helps prevent duplicate or conflicting work.

The Basic Idea

Run Requests Arrive
Users, schedules, or triggers start the same automation
Limit Is Checked
Automation Hub checks how many runs are already active
Run or Wait
New runs start, wait in line, or are rejected
Systems Stay Safe
Databases, APIs, and files avoid unnecessary pressure
Simple: concurrency control is the traffic light for automation runs.

Why It Matters

Imagine an automation updates customer records. If 50 copies run at the same time, they may all try to update the same data.

That can cause:

  • Slow systems
  • Locked records
  • Duplicate updates
  • Confusing results
  • Failed runs
  • Extra load on connected systems

Concurrency limits prevent this by controlling how many runs can be active at once.

Where Concurrency Is Configured

Concurrency settings are configured per-job in the job's ExecutionConfig settings. Each automation has its own limits, so you can set different rules for different automations based on how they interact with your systems.

The configuration has two main fields:

SettingInternal fieldWhat it controls
Maximum concurrent runsmaxConcurrentExecutionsHow many copies can run at the same time
Behavior when limit is reachedonLimitBehaviorWhat to do with new requests: QUEUE or REJECT

The Two Main Settings

Maximum Concurrent Runs (maxConcurrentExecutions)

This is the number of copies that can run at the same time.

SettingMeaning
1Only one run at a time
3Up to three runs at the same time
0No limit -- any number of runs can start

Use a smaller number when the automation changes important data. Use a larger number when the automation is safe to run in parallel.

What Happens When the Limit Is Reached (onLimitBehavior)

OptionInternal valueMeaningBest when
QueueQUEUEPut the new run in a waiting lineEvery request should eventually run
RejectREJECTDo not start the new runThe request can be tried again later

Queue vs Reject

info

QUEUE holds excess requests in a waiting line so they all run eventually, while REJECT drops them immediately and expects the caller to retry. Use QUEUE for business-critical work and REJECT for real-time checks where a delayed result has no value.

Queue (QUEUE)
"Wait your turn, then run automatically"
Reject (REJECT)
"Too busy right now, try again later"

Choose QUEUE when missing a run would be a problem. Choose REJECT when the request is only useful if it can start now.

Workflow Timeout

Each automation workflow has a default timeout of 10 minutes. If a run takes longer than this, it will be stopped. This timeout is configurable and helps prevent stuck or forgotten runs from occupying a concurrency slot indefinitely.

Automation typeSuggested limitWhat to do when full
Updates the same records1QUEUE
Updates different records2 to 5QUEUE
Sends emails or notifications10 to 20REJECT or QUEUE
Generates reports2 to 5QUEUE
Calls a rate-limited APIMatch the API limitQUEUE
Reads data only0 (no limit) or a high limitQUEUE
Uploads to the same folder1 to 2QUEUE

These are starting points. Adjust them after watching real runs.

Examples

Inventory Updates

Use a low maxConcurrentExecutions (such as 1) and set onLimitBehavior to QUEUE.

Why: inventory changes must not conflict with each other.

Report Generation

Use a medium maxConcurrentExecutions (such as 3) and set onLimitBehavior to QUEUE.

Why: reports can run in parallel, but too many may slow the server.

Email Notifications

Use a higher maxConcurrentExecutions (such as 10 or more).

Why: emails are usually safe to send in parallel, but you may still need to respect provider limits.

Read-Only Lookups

Set maxConcurrentExecutions to 0 (no limit) or a high number.

Why: reading data is usually safer than changing data.

How to Know the Limit Is Too Low

warning

Setting maxConcurrentExecutions too low can cause runs to queue up faster than they drain, leading to long delays and a backlog that grows without bound during busy periods.

SignWhat it means
Many runs are waiting in the queueThe automation may need a higher maxConcurrentExecutions
Runs start much later than expectedThe queue is too long
Users often wait for simple tasksThe limit may be too strict

How to Know the Limit Is Too High

SignWhat it means
Databases become slowToo many runs may be writing or reading at once
More timeouts appearConnected systems may be overloaded
Duplicate or conflicting updates happenRuns may be working on the same data
Failures increase during busy timesThe maxConcurrentExecutions may be too generous

A Safe Way to Tune Limits

  1. Start with a conservative maxConcurrentExecutions.
  2. Watch queue length, duration, and failures.
  3. Increase slowly if runs are waiting too long.
  4. Decrease if systems become slow or errors increase.
  5. Review again after schedules, usage, or connected systems change.

Good Concurrency Habits

Use low limits for important updates

If the automation changes records, accounts, inventory, payments, or files, be careful.

Queue work that must eventually happen

Reports, reconciliations, and business updates usually should wait (QUEUE) rather than disappear (REJECT).

Reject work that is only useful right now

Some checks or real-time requests may not matter if they start too late.

Monitor busy periods

Limits that work during quiet hours may fail during month-end or peak business times.