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

·7 min read·View Oracle Docs

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 stageTime limit (seconds)
Bundle Installation Scripts (SuiteScript 1.0) / SuiteScript 2.1 Bundle Installation Script Type3,600
Client Scripts (SuiteScript 1.0) / SuiteScript 2.1 Client Script Type300
Custom record action300
SuiteScript 2.1 Custom Tool Script Type300
SuiteScript 2.1 Event Subscriber Script Type3,600
Map/reduce input stage3,600
Map/reduce map stage300
Map/reduce reduce stage900
Map/reduce summarize stage3,600
Mass Update Scripts (SuiteScript 1.0) / SuiteScript 2.1 Mass Update Script Type300
Portlet Scripts (SuiteScript 1.0) / SuiteScript 2.1 Portlet Script Type300
RESTlets (SuiteScript 1.0) / SuiteScript 2.1 RESTlet Script Type300
SuiteScript 2.1 SDF Installation Script Type3,600
Single-page application (SPA)300
Scheduled Scripts (SuiteScript 1.0) / SuiteScript 2.1 Scheduled Script Type3,600
Suitelets (SuiteScript 1.0) / SuiteScript 2.1 Suitelet Script Type300
SuiteScript Server Pages (SSP) application300
User Event Scripts (SuiteScript 1.0) / SuiteScript 2.1 User Event Script Type300
Workflow Action Scripts (SuiteScript 1.0) / SuiteScript 2.1 Workflow Action Script Type300

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 typeTime limit (seconds)
Adjusted Consolidated Rates300
Bank Connectivity Plug-in300
Bank Statement Parser Plug-in1,800
Custom GL Lines Plug-in30
Dataset Builder Plug-in300
Email Capture Plug-in300
Financial Institution Connectivity Plug-in3,600
Financial Institution Parser Plug-in1,800
Payment Processing300
Platform Extension300
Promotions300
Revenue Management300
Shipping Partners300
Tax Engine60
Workbook Builder Plug-in300

The source lists the following limits for custom plug-ins:

Custom plug-in typeTime limit (seconds)
Plug-in Type3,600
Plug-in Type Implementation3,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_EXCEEDED and 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_EXCEEDED merely 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?
Several script types and map/reduce stages are listed with a 3,600-second limit: bundle installation scripts (SuiteScript 1.0 and SuiteScript 2.1 bundle installation type), the SuiteScript 2.1 Event Subscriber script type, the map/reduce input stage, the map/reduce summarize stage, the SuiteScript 2.1 SDF installation script type, and scheduled scripts (SuiteScript 1.0 / 2.1).
If a script isn’t exceeding its usage-unit limit, can it still hit SSS_TIME_LIMIT_EXCEEDED?
Yes. The article explains that a script can run a long time without exceeding usage units and still reach a time limit because of many record operations, repeated transactions on the same records, triggering user event scripts or workflows, or database queries/updates that collectively take a long time.
What restrictions should I expect when debugging scripts in the SuiteScript Debugger?
Scripts run in the SuiteScript 2.1 Debugger have a 300-second execution-time limit and a 1,000-unit usage limit while being debugged. Only one script can be debugged at a time and you can debug only your own scripts in your current login session; email error notification is disabled, execution-log locations differ between SuiteScript versions, and SuiteScript 1.0/2.0 debugger sessions have a two-minute idle timeout.
Do core and custom plug-ins share the same execution-time limit?
No. Core plug-ins have varying listed limits (for example, Custom GL Lines is 30 seconds and Financial Institution Connectivity is 3,600 seconds), whereas the documented custom plug-in entries show 3,600 seconds for both 'Plug-in Type' and 'Plug-in Type Implementation.'
Source: Script Execution Time Limits Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteScript

View all SuiteScript articles →