Time Limit Exceeded Errors

We have a search utility library that we use to grab search results that works great. However, we have one M/R that has started failing on the runPaged() call. What’s more interesting is that the M/R uses this library multiple times, and succeeds on multiple calls, but continues to get failures on a transaction search. It just times out and returns the error that says something like “Search timed out, try scheduling your results to be sent to you… etc.”


More interesting is that our jobs are batched into reduce where this search utility is called. Some batches execute without any issue at all, while others fail out. The data sets where it’s failing are anywhere from a few hundred results to a few thousand, but nothing out of the ordinary compared to the other batches.


Logging getRemainingUsage there is ample usage left within the script, and with regards to time, it’s failing out after sitting on runPaged for maybe 10 minutes or so.


If anyone has any advice, it would be a big help. Here is the search library:

Library Here

Beginner Asked on January 28, 2020 in SuiteScript.

Without seeing the filters and columns, I would try decreasing the page size

on January 28, 2020.

We have decreased the page size to multiple different numbers.  We also get the same timeout problem if the methodology is the search.run().each iterator (each search is return less than 10k).

on January 28, 2020.

This sounds like an error with a filter or column that’s causing a time out, doesn’t look like a size issue. Are there any deleted fields being referenced in the saved search? I would try making the search with less filters or columns until finding what’s going on.

on March 16, 2020.
Add Comment
1 Answer(s)

Saved searches have a limit of like 5 or 10 minutes before they time out irrespective of MR limitations. You’ll likely need to break up your search definition. Do you have complicated filters or columns? Can you put in a filter to segment the search by a date range or internalid?

Beginner Answered on March 18, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor