Error Reference

Script aborted: transaction quota exceeded

Script aborted: transaction quota exceeded

Where this appears

This error appears in the system application log accessible via System Diagnostics > Log > Application Log when server-side scripts exceed platform-imposed resource limits. It commonly occurs during Business Rule execution, Script Include operations, scheduled jobs, or background scripts that consume excessive database transactions, processing time, or memory.

Sourdough
Chrome Extension

Debugging this in a real instance?

Sourdough lets you trace "Script aborted: transaction quota exceeded" through system logs, script errors, and API health in the ServiceNow tab you are already using.

Add to Chrome

Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.

Overview
Tasks
CMDB
API
Metrics
Monitor
Internals
Instance:sourdoughdev·Version:Yokohama
Instance StateONLINE
System StatusFully Operational
Session Timeout90 minutes
Logged-In Sessions2 (20 active)
Build Nameyokohama-12-18-2024_p1
IP Address10.159.128.43
Instance HealthHealth Score: 90%
🔥 5dSourdough (Chrome Plugin)Dark Mode

Cause

Script performs excessive database queries within loops, such as iterating through large GlideRecord result sets without proper pagination or performing nested queries. (high likelihood)

Business Rules or Script Includes contain inefficient code that runs on high-volume tables like Task or Incident without proper filtering or optimization. (high likelihood)

Background scripts or scheduled jobs process large datasets without implementing proper batching mechanisms or transaction boundaries. (medium likelihood)

Script execution time exceeds the maximum allowed duration due to complex calculations, infinite loops, or synchronous web service calls. (medium likelihood)

Memory consumption exceeds limits due to loading large amounts of data into arrays or objects without proper cleanup. (low likelihood)

Fix

Step 1: Navigate to System Diagnostics > Log > Application Log and locate the specific error entry to identify the problematic script name and execution context.

Step 2: Review the identified script for database operations within loops, particularly GlideRecord queries that lack proper setLimit() calls or efficient query conditions.

Step 3: Implement query optimization by adding appropriate encoded queries, using setLimit() for result sets, and avoiding nested GlideRecord operations where possible.

Step 4: If processing large datasets, implement batching logic using scheduled jobs with smaller record sets or utilize the Event Management system to queue processing tasks.

Step 5: Check system properties under System Properties > All and review transaction timeout settings like glide.script.ccl.timeout.enabled and adjust if necessary.

Step 6: For Business Rules on high-volume tables, consider changing execution timing from sync to async or implementing condition filters to reduce unnecessary executions.

Step 7: Test the modified script in a sub-production environment using Debug Business Rules or background script execution to verify quota compliance.

Step 8: Monitor System Diagnostics > Stats > Transaction Stats after deployment to ensure the script operates within acceptable resource consumption limits.

Test Your Knowledge

Quick 3-question quiz. See how your ServiceNow skills stack up.

Question 1 of 3Performance

A list view on a table with millions of records is slow. Best fix?

Select an answer to continue