Limits & Quotas

Script engine limits

These limits protect Jira performance and prevent runaway scripts. If you hit a limit, optimize your script or split work across multiple runs using Scenarios.

Limit Engine name Value Globals Script Description
Max script complexity (AST nodes) maxAstNodes 15,000 / 50,000 200 Maximum complexity of a single script, measured in parsed (AST) nodes. 15,000 for UIM, Scripted Fields, Workflow Post Function / Validator / Condition and Recipe; 50,000 for Console, Event, Scheduled, Async Event, Automation, Rovo, Webtrigger and JQL Function. See per-trigger table below.
Max execution time maxExecutionMs per trigger (see below) 1,000 ms Maximum script execution time
Max loop iterations maxLoopIterations 50,000 (100,000 for Scheduled) 1,000 Total number of loop iterations
Max call depth maxDepth 64 32 Maximum call/nesting/recursion depth
Max string size maxStringSize 1 MB (1,048,576) 100 KB Maximum length of any single string value
Max log calls maxLogCalls 200 0 Number of output function calls (log, print)
Max collection size maxCollectionSize 10,000 10,000 Maximum Set/Map size; in Python and Groovy, list and collection growth is also bounded by this limit
Max array size maxArraySize 50,000 50,000 Maximum array size (JavaScript engine)
Max pending promises maxPendingPromises 50 (per trigger, see below) 0 Number of concurrent async operations: 20 for UIM, Scripted Fields, Workflow Validator / Condition and Recipe; 30 for Workflow Post Function
Max API calls maxApiCalls per trigger (see below) - Number of Jira REST API (requestJira) calls per script
Max eval calls maxEvalCalls 20 0 Total number of eval() calls per script
Max include depth maxIncludeDepth 5 5 Nesting depth of eval-by-id calls
Max input size maxInputSize 256,000 chars 10 KB Maximum number of source code characters parsed by the engine (the global variables script is limited to 10 KB of source)
Max files maxFiles 10 10 Number of files a script can create with createFile() per run (JavaScript engine)
Max total file size maxTotalFileSize 8 MB (8,388,608 bytes) 8 MB Total size of the files a script creates per run (JavaScript engine)

Note: The Globals Script column shows reduced limits for the global variables script, which runs before every other script execution and should be as lightweight as possible. The engine name is how the limit appears in error messages.

All three sandbox engines (JavaScript, Python, Groovy) share the same limits per trigger type. maxArraySize, maxFiles and maxTotalFileSize apply to the JavaScript engine (where createFile() is available); in Python and Groovy, list and collection growth is bounded by maxCollectionSize. When a limit is exceeded, execution stops with an error - see Limit and security errors.

Per-trigger limits

Execution time, API calls, and promises vary by trigger type:

Trigger Execution API Calls Promises Loop Iterations Max AST Nodes
Console 18s 40 50 50,000 50,000
UIM 5s 20 20 50,000 15,000
Scripted Fields 5s 20 20 50,000 15,000
Event 25s 60 50 50,000 50,000
Scheduled 55s 100 50 100,000 50,000
Async Event 55s 250 50 50,000 50,000
Automation 40s 80 50 50,000 50,000
Rovo 40s 80 50 50,000 50,000
Workflow Post Function 15s 40 30 50,000 15,000
Workflow Validator 10s 20 20 50,000 15,000
Workflow Condition 10s 20 20 50,000 15,000
Webtrigger 50s 100 50 50,000 50,000
Recipe 5s 20 20 50,000 15,000
JQL Function 22s 60 50 50,000 50,000

UIM and Scripted Fields are UI-facing (the user waits for the result), Workflow Post Functions run after a transition and Validators before it; Scheduled scripts run via the async queue.

Note: The Workflow Condition row is the sandbox budget configured for that trigger type. In practice a Workflow Condition script uses the Jira Expressions engine, which is evaluated natively by Jira - execution is then managed entirely by Jira and the sandbox limits do not apply.

Console: the 18 s execution budget sits under a 25 s hard cap of the Console resolver.

JQL Function timeout: the Forge platform enforces a 25 s hard cap on JQL function calls; the 22 s budget reserves 3 s for query handling and the platform round-trip.


API limits

Each script has a budget for Jira REST API calls and storage operations. Use JQL bulk searches instead of one-by-one fetches to stay within limits.

Limit Value
Max API calls per script per trigger (see table above)
Max response size per call 10 MB
Max table API calls per script 50
Max queue API calls per script 25

Script management

These limits apply to scripts stored in the Library.

Limit Value
Max scripts 1,000
Max script size 250 KB
Max script name 200 characters
Max versions per script 50
Max script description 2,000 characters
Max version description 2,000 characters
Max run history per script 10
Max run logs size 100 KB
Max run result size 50 KB

Global variables

The global variables script runs before every script execution, so its limits are intentionally strict.

Limit Value
Max global scripts 1
Max global script size 10 KB
Max variables 50

Triggers and parameters

Limit Value
Max triggers per script 10
Max trigger config size 50 KB
Singleton types All types (Scheduled, Event, UIM, Scripted Fields, Async Event, Automation, Rovo, Workflow Post Function, Workflow Validator, Workflow Condition, Webtrigger, JQL Function) - one trigger per type per script
Exclusive types Workflow Condition - cannot be combined with any other trigger on the same script

Organization

Folders and labels help you manage scripts at scale.

Limit Value
Max folders 200
Max folder name 50 characters
Max folder nesting depth 10 levels
Max folder description 2,000 characters
Max labels 100
Max label name 30 characters
Max labels per script 10
Max label description 2,000 characters

Custom tables

Tables store structured data accessible from scripts and the UI. If you need more than 5,000 rows, consider archiving old data or splitting across multiple tables.

Limit Value
Max tables 50
Max table name 100 characters
Max columns per table 30
Max column name 50 characters
Max rows per table 5,000
Max row data size 100 KB
Max bulk insert rows 100
Max filter conditions 10
Max search result rows 200
Max select options per column 50
Max select option length 100 characters
Table page size 50 rows

Async events

Async events let scripts trigger other scripts. The chain depth limit prevents infinite recursion: a script started by an async event cannot push another one.

Limit Value
Max async event calls per script 10
Max payload size 100 KB
Max delay 900 seconds (15 min)
Max chain depth 1 (allows 2 hops: depth 0 initial + depth 1 triggered)
Deduplication window 5 minutes
Async consumer execution time 55,000 ms

Webtrigger limits

Rate limits protect against request floods from external systems.

Limit Value
Rate limit 60 requests per minute
Rate limit window 60 seconds (fixed one-minute window; the counter resets at the start of each minute)
Max tokens per script 1

JQL function limits

Custom JQL functions registered via the JQL Functions admin tab are subject to the following limits.

Limit Value
Max execution time per call 22,000 ms
Max API calls per call 60
Max function name length 64 characters ([a-zA-Z][a-zA-Z0-9_]{0,63}, jbexec reserved)
Max user arguments per call 10 (Forge platform limit)
Max issue keys returned 1,000 (Forge platform limit)
Max raw JQL fragment length 8,000 characters (sanitized: no ;, -- or comments)
Result cache lifetime 7 days
Max precomputations per refresh 50
Refresh rate limit 1 per minute per function (applies to all refresh paths)
Scheduled refresh interval 5 minutes

See JQL Functions for cache freshness behaviour and refresh paths.


File generation

Scripts can generate files via createFile() (see Scripting Language). Files are returned alongside script output and can be downloaded from the Console.

Limit Value
Max file size per file 4 MB
Max files per execution 10
Max total file size 8 MB

Scenario limits

Scenarios split long-running operations into managed steps. If you need to process more data than one step allows, use emit() to pass data between steps.

Limit Value Description
Max steps per scenario 100 Total step() + loop() + batch() calls
Max iterations per step 1,000 Maximum next() calls in a loop() or pages in batch()
Max step result size 5 MB JSON-serialized return value of a single step
Max context size 20 MB Total JSON size of all completed step results
Max step logs size 512 KB Console output per step (truncated with warning if exceeded)
Batch size 1-100 Issues per batch page
Batch errors 100 Maximum number of error messages stored per batch step
Emit items per iteration 1,000 Maximum emit() calls per step/loop iteration
Emit data per iteration 2 MB Maximum serialized size of emitted data per iteration
Emit total per step 10 MB Maximum total emitted data across all iterations of a step
getStepData max limit 10,000 Maximum items returned in a single getStepData() call
Runs per script 20 Old completed runs are automatically cleaned up
Stale step timeout 10 min Steps running longer are reset for retry
API calls per step Same as async event trigger Each step has its own API call budget

Message queues

Queues handle asynchronous communication between scripts. Use consume() for simple pipelines and pull()/ack() when you need error handling.

Limit Value
Max queues 50
Max queue name 100 characters
Max queue description 2,000 characters
Max messages per queue 50,000
Max total queue messages 200,000
Max message payload size 100 KB
Max pull/consume count 10
Max push batch size 100
Max queue batch size 100
Queue page size 50

API restrictions

Whitelist and blacklist profiles control which Jira REST API endpoints scripts can call.

Limit Value
Max custom whitelist profiles 50
Max whitelist entries per profile 200
Max whitelist name 100 characters
Max whitelist description 2,000 characters
Max custom blacklist profiles 50
Max blacklist entries per profile 200
Max blacklist name 100 characters
Max blacklist description 2,000 characters

Audit

Limit Value
Max audit settings entries 10,000
Max audit executions 10,000 (rolling window)
Audit page size 25

Other limits

Limit Value
Max pre-configured users 20
Max user description 200 characters
Max context projects per script 50
Max context issue types per script 50
Max UIM field values 200
Max import JSON size 10 MB (Export / Import tab); 5 MB for a two-project sync configuration file
Scheduled handler timeout 55 seconds (Forge function that pushes scheduled scripts to the async queue)
Async consumer timeout 120 seconds (Forge function that executes scheduled and async scripts)
Max log string length 1,000 characters (longer strings are truncated in the logger)

Engine internals

Limit Value
Max regex pattern length 200 characters (ReDoS protection)
Nested quantifiers in regex Forbidden (ReDoS protection)
Regex flags Only g, i, m, s, u, y
Max template literal nesting depth 32
Max String.format() pattern length 500 characters

Attachment copy limits

Attachments.copy() and issue.copyAttachmentsTo() enforce their own per-call limits on top of the shared API-call budget. Each option has a default and a hard cap that the caller cannot exceed:

Option Default Hard cap
maxFileSize 5 MB 10 MB
maxFiles 20 50
maxTotalSize 25 MB 50 MB
filenames filter length - 50 entries

Each copied attachment consumes 2 maxApiCalls (download + upload), plus 2 more for the initial metadata reads. The source issue’s attachment download path must be allowed by the API whitelist.


Limit and security errors

Uncatchable errors

When an engine limit or security rule is violated, the script stops with one of these errors. They cannot be caught with try/catch:

Error Trigger
ScriptTimeoutError Execution time exceeded maxExecutionMs
ScriptSecurityError Forbidden property access, disallowed method, or an AST scanner violation
ScriptIterationError Loop iterations exceeded maxLoopIterations
ScriptNodeLimitError AST nodes exceeded maxAstNodes
ScriptEvalLimitError Total eval() calls exceeded maxEvalCalls

A regular ScriptError (syntax and runtime errors) and values thrown by the script itself can be caught:

// This WILL be caught:
try {
  throw "user error"
} catch (e) {
  log("caught:", e)   // => caught: user error
}

// This will NOT be caught (security error):
// try {
//   let x = obj.__proto__
// } catch (e) {
//   log("never reached")
// }

eval() include errors

These eval-by-id include errors can be caught with try/catch:

Error When
ScriptCircularIncludeError Circular dependency detected in the eval-by-id chain
ScriptIncludeDepthError Eval-by-id nesting exceeds maxIncludeDepth
ScriptIncludeNotFoundError Referenced script UUID not found
Parse error eval-by-id loaded a script written in a different engine language

Forbidden properties

Access to these properties is always forbidden and throws a ScriptSecurityError: __proto__, constructor, prototype, __defineGetter__, __defineSetter__, __lookupGetter__, __lookupSetter__.

// All of these throw security errors:
// let x = obj.__proto__
// let y = obj.constructor
// let z = obj.prototype

Note: The engine uses a Symbol-based internal marker for class references. Writing obj.__classRef = x from user code is allowed but has no effect on the sandbox - it cannot be used to tamper with real class definitions.

Method whitelisting

Only methods listed in Type Methods are callable. Calling any other method throws a security error:

let arr = [1, 2, 3]
arr.map(x => x * 2)       // works - map is whitelisted
// arr.constructor          // Error: Access to 'constructor' is forbidden

AST scanner errors

Before execution, the engine scans the parsed script. If a dangerous pattern is detected, a ScriptSecurityError is thrown before any code runs. These errors are also uncatchable:

Error pattern What it means
AST security violation [coercion-override] An object literal overrides toString or valueOf - potential sandbox exploit
AST security violation [forbidden-string-key] Computed property access uses a string literal to reach a forbidden property
AST security violation [forbidden-concat-key] Computed property access uses string concatenation that resolves to a forbidden property
AST security violation [call-apply-bind] The script uses .call(), .apply() or .bind(), which are not allowed

To fix an AST scanner error, restructure the code to avoid the flagged pattern:

  • Do not build forbidden property names with string literals or concatenation (obj['__pro' + 'to__'])
  • Avoid overriding toString() / valueOf() in object literals
  • Use direct function calls instead of .call() / .apply() / .bind()

Working within limits

Hitting execution timeout?

  • Add the fields parameter to Issues.search() and Issues.get() to load only the fields you need
  • Reduce the number of API calls per script - combine operations where possible
  • Move bulk operations to Scenarios where each step gets its own time budget

Hitting API call limit?

  • Use JQL bulk searches (Issues.search()) instead of fetching issues one by one
  • Cache data in variables instead of re-fetching the same issue multiple times
  • Split work across multiple scheduled runs or use async events to chain scripts

Hitting string or array size limit?

  • Process data in chunks instead of building one large array
  • Use Custom Tables for intermediate storage between script runs
  • Filter data server-side with JQL instead of loading everything and filtering in the script

General tips

  • Use Issues.search() with maxResults instead of fetching all issues
  • Prefer for...of loops over deeply nested iterations
  • Use CSV.stringify() for bulk output instead of many log() calls
  • Break large scripts into smaller ones and use eval(scriptId) to chain them

Hitting loop iteration limit?

  • Let Issues.search() paginate for you (maxResults above 100) instead of writing manual page loops
  • In Scenarios, use batch() which handles pagination automatically
  • Scheduled triggers have a higher loop limit (100,000) - consider switching from event triggers for heavy processing

Next steps


JiBrok Studio for Jira Cloud JiBrok Studio for Jira Cloud
Release notes
Core Features
Triggers
Extensions
Data Storage
Scripting Overview
JavaScript Engine
Python Engine
Groovy Engine
Scripting API
Administration
Guides