NetSuite Script Time Limits and Debugger Rules
NetSuite execution limits by script and plug-in type, `SSS_TIME_LIMIT_EXCEEDED`, usage-unit context, and debugger restrictions
NetSuite assigns execution-time limits to script types and plug-in types. When a limit is exceeded, NetSuite throws SSS_TIME_LIMIT_EXCEEDED and stops script execution. The applicable limit depends on the script, plug-in, or map/reduce stage. Debugging also has separate time, usage-unit, session, and logging restrictions that can differ from normal execution.
What happens when a script exceeds its time limit?
Each server script type and plug-in type has a limit on the time it can run in a single execution. If it exceeds that limit, NetSuite throws SSS_TIME_LIMIT_EXCEEDED and script execution stops.
Time limits should be considered alongside usage-unit limits, but they are not the same constraint. Oracle notes that a script can run for a long time without displaying SSS_TIME_LIMIT_EXCEEDED in several situations:
- It performs many record operations without exceeding its usage-unit limit.
- It processes many transactions for the same records, such as items or lot numbers, without exceeding its usage-unit limit.
- It causes many user event scripts or workflows to execute.
- Its database queries or updates collectively take a long time to complete.
That distinction matters when reviewing a slow execution. Usage-unit consumption alone does not describe all of the work that may contribute to elapsed execution time. The source material also provides Script Type Usage Unit Limits, including the Script.getRemainingUsage() method for checking remaining usage units for a script.
Which script types have each execution-time limit?
The following limits are measured in seconds. They are the limits listed for each script type or map/reduce stage.
| Script type or stage | Time limit (seconds) |
|---|---|
| Bundle Installation Scripts (SuiteScript 1.0) / SuiteScript 2.1 Bundle Installation Script Type | 3,600 |
| Client Scripts (SuiteScript 1.0) / SuiteScript 2.1 Client Script Type | 300 |
| Custom record action | 300 |
| SuiteScript 2.1 Custom Tool Script Type | 300 |
| SuiteScript 2.1 Event Subscriber Script Type | 3,600 |
| Map/reduce input stage | 3,600 |
| Map/reduce map stage | 300 |
| Map/reduce reduce stage | 900 |
| Map/reduce summarize stage | 3,600 |
| Mass Update Scripts (SuiteScript 1.0) / SuiteScript 2.1 Mass Update Script Type | 300 |
| Portlet Scripts (SuiteScript 1.0) / SuiteScript 2.1 Portlet Script Type | 300 |
| RESTlets (SuiteScript 1.0) / SuiteScript 2.1 RESTlet Script Type | 300 |
| SuiteScript 2.1 SDF Installation Script Type | 3,600 |
| Single-page application (SPA) | 300 |
| Scheduled Scripts (SuiteScript 1.0) / SuiteScript 2.1 Scheduled Script Type | 3,600 |
| Suitelets (SuiteScript 1.0) / SuiteScript 2.1 Suitelet Script Type | 300 |
| SuiteScript Server Pages (SSP) application | 300 |
| User Event Scripts (SuiteScript 1.0) / SuiteScript 2.1 User Event Script Type | 300 |
| Workflow Action Scripts (SuiteScript 1.0) / SuiteScript 2.1 Workflow Action Script Type | 300 |
Map/reduce needs particular care when interpreting this table. The usage-unit material says there is no limit imposed on the full duration of a map/reduce script deployment instance. Instead, isolated components of the deployment, including usage units used by a single method invocation, are regulated. The time limits above identify the limits for the input, map, reduce, and summarize stages.
Which core and custom plug-ins have time limits?
Core plug-ins do not share one universal limit. Their listed limits range from 30 seconds for Custom GL Lines to 3,600 seconds for Financial Institution Connectivity.
| Core plug-in type | Time limit (seconds) |
|---|---|
| Adjusted Consolidated Rates | 300 |
| Bank Connectivity Plug-in | 300 |
| Bank Statement Parser Plug-in | 1,800 |
| Custom GL Lines Plug-in | 30 |
| Dataset Builder Plug-in | 300 |
| Email Capture Plug-in | 300 |
| Financial Institution Connectivity Plug-in | 3,600 |
| Financial Institution Parser Plug-in | 1,800 |
| Payment Processing | 300 |
| Platform Extension | 300 |
| Promotions | 300 |
| Revenue Management | 300 |
| Shipping Partners | 300 |
| Tax Engine | 60 |
| Workbook Builder Plug-in | 300 |
The source lists the following limits for custom plug-ins:
| Custom plug-in type | Time limit (seconds) |
|---|---|
| Plug-in Type | 3,600 |
| Plug-in Type Implementation | 3,600 |
For teams reviewing a mixed script and plug-in estate, the tables provide the relevant starting point: a 300-second limit is common, but it is not universal. Custom GL Lines and Tax Engine have shorter listed limits, while several installation, scheduled, event-subscriber, and financial-institution entries have 3,600-second limits.
How do time limits relate to usage-unit limits?
A time limit governs how long the execution can run. Usage units are a separate form of metering. The supplied usage-unit material identifies different total allowances by script type and notes that Script.getRemainingUsage() returns the usage units remaining for a particular script.
For example, the usage-unit source says client scripts are metered on a per-script basis. If an account has a form-level client script and a record-level client script deployed to a record, each can total 1,000 usage units; those units are not shared by all client scripts associated with that form or record. The same material lists 1,000 usage units per execution for the SuiteScript 2.1 Custom Tool and Event Subscriber script types, and 10,000 units per execution for bundle installation scripts.
The time-limit source specifically warns against using usage-unit status as the only indicator of a lengthy execution. Record work, transactions involving the same records, triggered user events or workflows, and cumulative database work can all correspond with a long-running script even where the usage-unit limit has not been exceeded.
For additional usage-unit and governance context, see SuiteScript Usage Unit Limits by Script Type Guide and SuiteScript Governance Limits and Performance in NetSuite.
What restrictions apply in the SuiteScript Debugger?
Scripts executed in the SuiteScript 2.1 Debugger have a 300-second, or five-minute, time limit. Oracle separately documents metering and permission restrictions that apply to all SuiteScript 1.0, 2.0, and 2.1 script types being debugged:
- Only one script can be debugged at a time. If multiple scripts are debugged simultaneously, such as from two browser windows, the same script/debugging session appears in both windows.
- You can debug only your own scripts in your current login session.
- Scripts being debugged have a 1,000-unit usage limit. The source highlights scheduled scripts as an example: although they are permitted 10,000 units when running in NetSuite, the Debugger throws a usage-limit error if a 2,000-unit scheduled script reaches 1,000 units while being stepped through or executed.
- Email error notification is disabled for scripts being debugged.
- For SuiteScript 1.0 and 2.0, execution-log details appear on the Debugger's Execution Log subtab rather than the Script Deployment execution log. For SuiteScript 2.1, execution-log details appear on the Console tab in the Chrome DevTools debugging window.
Both the SuiteScript Debugger and the 2.1 Script Debugger have idle timeouts. For SuiteScript 1.0 and 2.0 scripts in the debugger, the stated idle limit is two minutes: if no user action occurs during that period, the debug session ends.
Who This Affects
- SuiteScript developers: Review both the time limit for the selected script type and the separate usage-unit allowance for that type.
- Map/reduce developers: Apply the time-limit table at the stage level and distinguish those stage limits from the duration of the overall deployment instance.
- Plug-in developers: Check the specific core or custom plug-in entry rather than assuming the 300-second value applies to every plug-in.
- Debuggers of SuiteScript code: Account for the 1,000-unit debug limit, the single-script restriction, session ownership requirement, logging location, and idle timeout rules.
- Teams investigating slow execution: Include record operations, repeated work on the same records, triggered user events or workflows, and cumulative database operations in the review—not only usage-unit consumption.
Key Takeaways
- A script or plug-in that exceeds its listed execution-time limit throws
SSS_TIME_LIMIT_EXCEEDEDand stops executing. - Listed limits range from 30 seconds for Custom GL Lines to 3,600 seconds for several script and plug-in types.
- Map/reduce has stage-specific time limits; the supplied usage-unit documentation says the overall deployment instance has no full-duration limit.
- A long-running script may not display
SSS_TIME_LIMIT_EXCEEDEDmerely because it performs extensive record, transaction, workflow, or database work without exceeding its usage-unit limit. - The SuiteScript 2.1 Debugger has a 300-second execution-time limit, while debugger metering also imposes a 1,000-unit limit on scripts being debugged.
For related implementation references, see Error Handling for SuiteScript Sublist Values, HTTP Request Error Management in NetSuite SuiteScript 2.x, and Script Object Members in SuiteScript for Developers.
Frequently Asked Questions (4)
Which script types and map/reduce stages have a 3,600-second execution-time limit?
If a script isn’t exceeding its usage-unit limit, can it still hit SSS_TIME_LIMIT_EXCEEDED?
What restrictions should I expect when debugging scripts in the SuiteScript Debugger?
Do core and custom plug-ins share the same execution-time limit?
Was this article helpful?
More in SuiteScript
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category