> How to fix SSS_USAGE_LIMIT_EXCEEDED in SuiteScript · CSDocs blog
> Why NetSuite throws SSS_USAGE_LIMIT_EXCEEDED, governance unit limits by script type, the four SuiteScript patterns that burn units fastest, and how to fix them cleanly.
> Page: https://getcsdocs.com/guide-usage-limit

[Blog](https://getcsdocs.com/blog) · Errors

# How to fix SSS_USAGE_LIMIT_EXCEEDED in SuiteScript

**[Ben Rogol](https://getcsdocs.com/author) ** · Founder, Cloud Steward · Nov 19, 2026

`SSS_USAGE_LIMIT_EXCEEDED` is NetSuite telling you a script exhausted its governance unit budget before finishing. The frustrating part is that a script can work fine for months—then order line counts grow or month-end volume spikes, and suddenly it starts failing mid-save.

## Know the governance ceiling for your script type

Every NetSuite API call costs a fixed number of governance units (for example, loading a transaction costs 10 units and saving one costs 20, while `search.lookupFields` costs 1 and `record.submitFields` costs 10 on transactions or 2 on non-transaction records):

- **Client Script, User Event, Suitelet:** 1,000 units per execution
- **RESTlet:** 5,000 units per execution
- **Scheduled Script:** 10,000 units per execution
- **Map/Reduce:** 10,000 units in `getInputData`, 1,000 per `map` key, 5,000 per `reduce` key, 10,000 in `summarize`

## The four patterns that burn governance fastest

1. **`record.load()` + `record.save()` inside a loop:** Loading and saving 35 related transactions in a User Event burns over 1,050 units on its own. If you are only reading fields, replace `record.load()` with a single batched `N/search` or `N/query` (SuiteQL). If you are only updating body fields, switch to `record.submitFields()`.
2. **N+1 searches per line item:** Running a search inside a `for` loop over Sales Order or Invoice lines burns 10 units per `run().getRange()` or `each()` call. Collect all item or entity IDs into an array first, run **one** search with an `anyof` filter, and store the results in a lookup object keyed by ID.
3. **Heavy batch work inside a User Event or Scheduled Script:** User Events have a hard 1,000-unit ceiling and cannot reschedule themselves. If a User Event needs to update dozens of child records, hand the IDs off to a **Map/Reduce** script via `N/task`. Likewise, if a Scheduled Script processes unbounded backlogs, move it to Map/Reduce so each key gets its own fresh governance budget.
4. **Missing yield / reschedule in legacy Scheduled Scripts:** If you must stay on a Scheduled Script, check `runtime.getCurrentScript().getRemainingUsage()` inside your main loop and re-queue the task via `N/task` before units drop below a safe buffer (for example, 500 units).

## How to verify the fix before deploying

Log `runtime.getCurrentScript().getRemainingUsage()` at the start and end of the script in Sandbox on your largest realistic transaction (e.g., a 100-line Sales Order, not a 2-line test order). Also check whether your script triggers other User Events on child records—governance is tracked per script execution, but cascading saves can still cause timeouts or errors in downstream scripts.

## Where CSDocs helps

CSDocs checks your Script Execution Logs and source code every night, surfaces failing scripts like `SSS_USAGE_LIMIT_EXCEEDED` automatically, and shows the exact lines and downstream records involved. On CSDocs Pro, you can generate a refactored Sandbox fix package with side-by-side diffs before your developer deploys it.

## More NetSuite guides

Performance

### Why is saving a Sales Order in NetSuite so slow?

How to trace slow Sales Order saves across APM, Scripted Records, User Events, and Workflows.

Fields

### Before you delete a custom field

What to check across scripts, workflows, saved searches, and finance controls before touching a custom field.
