Just to be sure... the timeout of the http request...
# suitescript
m
Just to be sure... the timeout of the http requests initiated from NetSuite using SuiteScript to other systems, is something that we can't control, right?
s
Hey @Marawan مَرَوَان, that is correct, the https time limit in using the built in SS 2.x https.request API module cannot be changed or extended.
I believe that NS allows 5 seconds to make a connection to the destination server, and 45 seconds to transfer the payload, and if exceeded will result in either a connection timeout error or a request timeout error depending on the nature of the request
m
Got it, thanks!!!!
s
Sure thing - For what it's worth, if it's a reasonable sized request and your experiencing only occasional errors perhaps due to volume, what I have done in the past to get around this is leveraging https.request.promise() with retry logic.
m
That sounds like a good solution, but I feel that the clients servers are slow or have a lot of load on them, and retrying won't work. (we tried it)... We ended up reducing the payload. But they were asking about the time limit, so I wanted to be sure before telling them that we can't control it.
s
Right on!!