can anyone confirm that `runPaged().fetch()` has a...
# suitescript
s
can anyone confirm that
runPaged().fetch()
has a 5 minute (300 second) timeout?
c
Help doesn't say. I've used this for years and never had it time out. The only documented error is the INVALID_PAGE_RANGE.
s
I've got a script that is mysteriously breaking at exactly 5 minutes in, with UNEXPECTED ERROR whilst waiting for
fetch()
to return a page.
I'm thinking perhaps there's some sort of undocumented limit there
c
is it running a saved search? I'd maybe make the search in the UI and see if it works ok
and then maybe load that search and see if it still bombs out
m
I recall encountering a very similar problem @stalbert. I think your 300-second timeout theory is correct.
s
thanks guys. I've had issues with the search in the UI but not usually. This is a search that's just loaded by id in the script then
runPaged().fetch()
to get the first page of results.
good to hear there's at least some anecdotal evidence of a per-page timeout exists @mattdahse, thanks
p
I think it’s an undocumented per-script execution time limit in some circumstances, not specifically the fetch function itself. I must test it one day with some sort of purposely sleeping script
m
If it were me, I might try reducing the page size if possible or optimizing the filters.
s
I have tried 500 for a page size (vs. 1000), maybe I should reduce it to a tenth that or something...but since I'm getting an unexpected error it feels like this is one of those 'experimental workaround' situations. I'll look into trying to simplify the filters and/or columns too I suppose. Also notable - the script failed after exactly 5 minutes every day for a week - now Monday and the search is magically completing - but I notice it never hits that 5 minute mark.
c
if you're getting an unexpected error it usually means you've done something stupid along the lines
not 100% of the time but like 99%
ive never seen that happen even w/ large datasets im curious what it is
s
I'm curious too - especially given how it failed so consistently and suddenly works again with no change on my end