- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 12:38 PM
Hello All,
I was told that "Integration session for a " single http request" can only stay alive for maximum 30 mins. This value is hard-coded and not configurable.
Does this mean for the setHttpTimeout method, the parameter we pass is limited to "1800000" Milliseconds (30 minutes)
Example Code:
var sm = new sn_ws.RESTMessageV2("<REST_message_record>","get"); //Might throw exception if message doesn't exist or not visible due to scope.
sm.setHttpTimeout(1800000);//Is this Wrong ?
We have a scheduled Job that makes an Outbound Rest API call, and we need this API call to be synchronous and alive for more than 30 minutes.
Any help is greatly appreciated.
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2018 09:46 PM
You can increase timeout with below system property
glide.rest.outbound.ecc_response.timeout
Alternatively, use the "waitForResponse" property to overwrite the glide.rest.outbound.ecc_response.timeout value on the REST message call.
E.g.:
var sm = new sn_ws.RESTMessageV2(SLOW_REST_MESSGE,"get"); var response = sm.executeAsync(); response.waitForResponse(20); |
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2018 09:46 PM
You can increase timeout with below system property
glide.rest.outbound.ecc_response.timeout
Alternatively, use the "waitForResponse" property to overwrite the glide.rest.outbound.ecc_response.timeout value on the REST message call.
E.g.:
var sm = new sn_ws.RESTMessageV2(SLOW_REST_MESSGE,"get"); var response = sm.executeAsync(); response.waitForResponse(20); |
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2018 09:47 PM
Hi Aman,
Better way to perform this would be to use executeAsync method and let MID server and ECC queue take care making a call and returing the response. This will prevent the instance thread or semaphore getting blocked for "n" amount of seconds unncessarily.
We have done this several times by using MID server where single call of ours was expected to take around 10 - 12 minutes.
You can use setEccParameter() method to pass on your "custom" XML tag and write a sensor script ( business rules on ECC queue table ) to parse the response and correlate back based on this customer parameter. You have to make BR conditional for your TOPIC ( Please see BRs on ECC Queue for more information )
https://community.servicenow.com/community?id=community_question&sys_id=49a70fa9db1cdbc01dcaf3231f961935&view_source=searchResult
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 03:44 PM