Monitoring NetSuite: Best practices to prevent errors and boost performance

Monitoring NetSuite: Best practices to prevent errors and boost performance

By

Martina Karszensztejn

Last Modified Date:

Sep 11, 2025

Sep 11, 2025

Monitoring NetSuite: Best practices to catch errors, improve performance, and sleep better.

Why monitoring matters (even after Go-live)

We all know the development flow, it starts with gathering requirements, designing and building the solution, passing through QA and UAT, and finally reaching the long-awaited go-live. At that point, everything seems to be working.

  • But what happens next?
  • Do we just trust that our code will run smoothly forever?

Of course not. Errors will happen, performance will fluctuate, and business-critical processes can be affected silently, unless we monitor.

What should we monitor in NetSuite?

The most powerful window into your account’s behavior is the logs generated by scripts, workflows, and services.

But it’s not just about catching errors, monitoring performance is just as important. A script might not fail, but it could still be slow, hurting the user experience and wasting system resources.

That’s why how we log matters as much as what we log.

Logging: Principles to keep your monitoring useful

1. Use the right log level

Logging a customer ID? That’s debug, not error. The right log level helps surface actual issues without being buried under irrelevant messages.

// ❌ Incorrect log level
log.error('customer id', customer);
// ✅ Should be
log.debug('customer id', customer);

2. Avoid log spamming

NetSuite enforces log limits. If you emit too many logs, important ones might be lost. Avoid:

  • Logging inside loops
  • Logging in frequently triggered services or scripts

Example:

// ⚠️ This will log once per transaction line
for (let line = 0; line < itemCount; line++) {
  log.debug('item', line);
}

3. Set script deployments to "Error" log level

This keeps your logs focused on what matters in production, real issues.

Unhandled errors and email alerts

When scripts crash without a try/catch, NetSuite logs a System error and sends an email alert. You can control:

  • Whether alerts go to all admins

  • A specific email address

  • A group of employees

Performance: What’s slowing NetSuite down?

Some scripts block user interaction (e.g., User Events, Client Scripts), others run in the background (Scheduled, Map/Reduce). But even background processes consume system processors. Each NetSuite account has limited CPU threads, so misused scripts can bottleneck the entire system.

Rule of thumb:*

A user event script running over 1 second is slow. Over 10 seconds is very slow.
*For scripts that block user interaction.

Monitoring tools in NetSuite

✅ Script execution logs

Track all script logs (up to 5 million entries). Filter by level, script, or time to identify noisy or failing processes.

✅ APM (Application Performance Monitoring)

A free SuiteApp that provides:

  • Page time summary: Breakdown of script and workflow performance by record type.
  • SuiteScript analysis: Graphs with execution time, logs, and user breakdown.
  • Processor monitor: Insights into script concurrency and CPU usage.

Common performance killers in SuiteScript

🔁 API calls inside loops

Instead of calling record.load() or search.run() repeatedly, batch your operations.

Bad example:

// Runs a search per item
for (let item of items) {
  search.lookupFields(...);
}

Better approach:

// Batch fetch all needed fields in one search
search.create({
  filters: [['internalid', 'anyof', itemIds]],
  ...
});

💾 record.save() vs submitFields()

If you're not editing sublists, use submitFields() , it's faster and uses fewer governance units.

Final thoughts

Monitoring isn’t just about debugging, it’s about building reliable systems, ensuring a smooth user experience, and making your solutions sustainable at scale.

Whether you're a developer, administrator, or consultant, setting up proper monitoring practices will save time, money, and stress, and keep your clients happy.

👉 Want to improve monitoring in your NetSuite account?

Contact us at BrokenRubik, we’d love to help.

Monitoring NetSuite: Best practices to catch errors, improve performance, and sleep better.

Why monitoring matters (even after Go-live)

We all know the development flow, it starts with gathering requirements, designing and building the solution, passing through QA and UAT, and finally reaching the long-awaited go-live. At that point, everything seems to be working.

  • But what happens next?
  • Do we just trust that our code will run smoothly forever?

Of course not. Errors will happen, performance will fluctuate, and business-critical processes can be affected silently, unless we monitor.

What should we monitor in NetSuite?

The most powerful window into your account’s behavior is the logs generated by scripts, workflows, and services.

But it’s not just about catching errors, monitoring performance is just as important. A script might not fail, but it could still be slow, hurting the user experience and wasting system resources.

That’s why how we log matters as much as what we log.

Logging: Principles to keep your monitoring useful

1. Use the right log level

Logging a customer ID? That’s debug, not error. The right log level helps surface actual issues without being buried under irrelevant messages.

// ❌ Incorrect log level
log.error('customer id', customer);
// ✅ Should be
log.debug('customer id', customer);

2. Avoid log spamming

NetSuite enforces log limits. If you emit too many logs, important ones might be lost. Avoid:

  • Logging inside loops
  • Logging in frequently triggered services or scripts

Example:

// ⚠️ This will log once per transaction line
for (let line = 0; line < itemCount; line++) {
  log.debug('item', line);
}

3. Set script deployments to "Error" log level

This keeps your logs focused on what matters in production, real issues.

Unhandled errors and email alerts

When scripts crash without a try/catch, NetSuite logs a System error and sends an email alert. You can control:

  • Whether alerts go to all admins

  • A specific email address

  • A group of employees

Performance: What’s slowing NetSuite down?

Some scripts block user interaction (e.g., User Events, Client Scripts), others run in the background (Scheduled, Map/Reduce). But even background processes consume system processors. Each NetSuite account has limited CPU threads, so misused scripts can bottleneck the entire system.

Rule of thumb:*

A user event script running over 1 second is slow. Over 10 seconds is very slow.
*For scripts that block user interaction.

Monitoring tools in NetSuite

✅ Script execution logs

Track all script logs (up to 5 million entries). Filter by level, script, or time to identify noisy or failing processes.

✅ APM (Application Performance Monitoring)

A free SuiteApp that provides:

  • Page time summary: Breakdown of script and workflow performance by record type.
  • SuiteScript analysis: Graphs with execution time, logs, and user breakdown.
  • Processor monitor: Insights into script concurrency and CPU usage.

Common performance killers in SuiteScript

🔁 API calls inside loops

Instead of calling record.load() or search.run() repeatedly, batch your operations.

Bad example:

// Runs a search per item
for (let item of items) {
  search.lookupFields(...);
}

Better approach:

// Batch fetch all needed fields in one search
search.create({
  filters: [['internalid', 'anyof', itemIds]],
  ...
});

💾 record.save() vs submitFields()

If you're not editing sublists, use submitFields() , it's faster and uses fewer governance units.

Final thoughts

Monitoring isn’t just about debugging, it’s about building reliable systems, ensuring a smooth user experience, and making your solutions sustainable at scale.

Whether you're a developer, administrator, or consultant, setting up proper monitoring practices will save time, money, and stress, and keep your clients happy.

👉 Want to improve monitoring in your NetSuite account?

Contact us at BrokenRubik, we’d love to help.

CONTACT US

Let’s Talk!

Have a question, idea,
or project in mind?

Leave us a message below, we’d love to hear from you. Our team will get back to you shortly to explore how we can help.

CONTACT US

Let’s Talk!

Have a question, idea,
or project in mind?

Leave us a message below, we’d love to hear from you. Our team will get back to you shortly to explore how we can help.

CONTACT US

Let’s Talk!

Have a question, idea,
or project in mind?

Leave us a message below, we’d love to hear from you. Our team will get back to you shortly to explore how we can help.