Hey all. I asked this question yesterday. It seems...
# suitescript
a
Hey all. I asked this question yesterday. It seems the issue is that I am passing along params to the map reduce. When I make it much smaller it works. For 2 years it never had an issue until now. Does it make sense that Netsuite changed the size (downwards) of how big a parameter of a map reduce task can be?
c
Unexpected Error "typically" means that YOU did something weird. You say nothing changed in code, but did any data change? Most likey if it WAS working and now it isn't and there hasn't been any code change, that the data is now different.
e
I agree to @creece, check the limit of characters on free-form-text or long text type of fields, probably you are exceeding something or sending special characters that are causing the unexpected error when parsing at some point
a
So I am writing the parameter to a flat file so I can see it properly as it is too big for the execution log. It takes about an hour to run I would agree with all of the above. The only reason I think it is a size issue and not a data thing is because when I Iimit the search sizes to get the first 10 as opposed to all results it works as expected.
Which tells me its not that a field changed
c
You could try writing to a file prior to calling task.submit and then have the map/reduce pick up the file from the file cabinet and process it. You aren't passing the data in that case and it does the same thing.
There IS a limit between phases (i think its 200mb now between get input and the rest) but you'd see a STORAGE_SIZE_... error of some kind not an unexpected error
a
But this isn't happening between stages of a map reduce script. It is trying to trigger another MapReduceTask with
params
s
Just out of curiosity, could you break your params into multiple chunks, and submit multiple tasks of the next script? If it’s the size that is the problem, breaking it up into two or three parts might get around that.
I assume it contains a large array of objects/elements.
s
Why are putting so much data into a single string and passing as a param, what is the other script/task you are creating tryign to do with all that stuff.
s
Actually, you could just have the next script read in the params from the file you are writing. All you need to do is pass along the id of the file, then have the next script load it and get the contents in the getInputData stage. You could even delete the file in the summarize stage when you are done with it.
a
@scottvonduhn I believe that's what @creece was suggesting
@Sandii Great question. The answer is I am just taking over someone elses code....
I don't know why they break it up into 2 map reduces
The second one sends emails
When saved as a text file as in the file cabinet it takes up 1 MB
Its an array of 5426 objects
s
summarize has a lot of governance, unless there is that much going on in the other MR, I would consider just doing whatever it is doing in the summarize of the first script
a
Scratch that. Not a size issue as many of you correctly suggested. For some reason in this array of 5246, there are over 1000 that have a key with an undefined value
s
bad data is bad
a
I take that back. It wasn't an undefined/bad data issue as far as I can see so far.
It seems like it definitely is a size issue, because I split the array into 3 parts and each one separately worked