Usually the SFTP downloads in my account works as ...
# suitescript
a
Usually the SFTP downloads in my account works as expected. But this morning I started getting the error "Script Execution Time Exceeded". There is no script change but still getting the errro. Any ideas please ?? Thanks
b
Depending on what kind of script you have, your script is running too long
If its a scheduled script, yield more often
a
its a Suitelet Script @battk
b
i dont think ive seen that error on a suitelet
are you doing something that is triggering a user event script
and its the user event script throwing the error?
a
No we are not calling any user event script. When i checked the logs the error is throwing at the time of connection to the SFTP server which is sftp.createConnection(options).
From the SFTP server side we don't have any changes in the past as well. I think the Netsuite API sftp.createConnection(options) has some issue with it @battk
b
you probably want to get started on that netsuite support case
a
ok I will contact NetSuite support. Thanks @battk
s
SFTP'ing files around using a Suitelet might also not be the best option...
a
without using suitelet how the users can upload the file ?? @stalbert . right now we are using suitelet page where the users upload the file and we take the same file and upload the file to the SFTP server in the same suitelet Script. Is it not a good practice ??
s
If your business process would tolerate it, I'd recommend capturing the file with the suitelet saving to the file cabinet. Then have a background script (e.g. scheduled script) pick up the file(s) and send to SFTP.
a
ok Thanks. I will check with my team to see if we can change to above described process.
What would be the benefit of using scheduled script process compared to suitelet process we currently using?? @stalbert
a
I do get the same errors right now frequently which is not a problem prior 2020.1
e
getting the same error.. since friday. i dont think it's coz @Arun Dasari implemented it in a suitelet, there's something wrong with the SFTP APIs.
a
As @Alexter Philip De Guzman and you @edpiper seeing the same error, It seems to be there is something wrong with the SFTP API's. I have already created support case with NetSuite and waiting for their response. Please let me know if you guys have any update on this. Thanks
e
Same.. I just filed a Support Case. We'll update here as well, if any.
s
A scheduled script has much more governance and longer execution time limits than a Suitelet. It can also be designed to retry on error without bothering the end user.
e
Agree @stalbert... You may want to consider that @Arun Dasari Though, the problem for this case, is not on the design limitation. It's a system error, which by the way, NS Support has reverted and fixed my case.
a
Okay Thanks