- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2019 07:30 AM
Hi!
When launching a REST request, I’m getting ECCResponseTimeoutException (com.glide.ecc.ECCResponseTimeoutException: No response for ECC message request with sysid=957fa87adbb07300e9565d50cf961944 after waiting for 30 seconds in ECC Queue) nevertheless I set a bigger HTTP Timeout.
The endpoint I’m calling returns the response (but after 45 secs) via Postman, so it’s working, but slow…
Here is the code I’m using (testing through Scripts – Background):
var endpoint = "https://myEndpoint";
var authentication_profile = "1010102c5dbd03300e9561010cf961101d";
var MIDServer = "myMIDServer";
var REST_request = new sn_ws.RESTMessageV2();
REST_request.setHttpMethod("get");
REST_request.setHttpTimeout("5000");
REST_request.setEccParameter("skip_sensor", "true");
REST_request.setEndpoint(endpoint);
REST_request.setAuthenticationProfile("basic", authentication_profile);
REST_request.setMIDServer(MIDServer);
try {
var response = REST_request.execute();
gs.info(response.getStatusCode());
} catch(error) {
gs.error(error);
}
Of course, I double-checked that the MID Server is up and running. Just changing the endpoint to a faster one works fine.
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- 35,445 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 12:45 AM
We reported this to Hi and received a response which worked for us:
"Please be informed that we have recently introduced a new property in order to control http connection timeouts for improved performance throughout the instance.
- Property:
glide.http.outbound.max_timeout
- Description: Specifies the number of seconds that RESTMessageV2 and SOAPMessageV2 APIs wait for a response from a synchronous call. The maximum value is 30 seconds.
RESOLUTION: To define a timeout longer than 30 seconds, set the glide.http.outbound.max_timeout.enabled
system property to false and use the waitForResponse() method to set the timeout (after setting that property to false you should be able to set different timeouts with waitForResponse()). For examples, see Asynchronous RESTMessageV2 example: https://docs.servicenow.com/bundle/madrid-application-development/page/app-store/dev_portal/API_refe...
and Asynchronous SOAPMessageV2 example:
https://docs.servicenow.com/bundle/madrid-application-development/page/app-store/dev_portal/API_refe...
If glide.http.outbound.max_timeout.enabled is set to true and a value is passed in the waitForResponse() method, the system uses the smallest value from either the waitForResponse() method or the glide.http.outbound.max_timeout system property."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2019 03:10 AM
Hi David,
have you solved it?
I had the same problem in Kingston_patch14 release.
Thanks,
Laura
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2019 03:39 AM
Hi Laura,
No, I'm still facing the issue. I was wondering if it was something specific of Madrid version, but thanks to you I can discard it
I had tried through System Web Services / Rest Messages with the same result, so I'm pretty sure the problem is something about the MIDServer's configuration (properties/preferences) and not my code.
Hope somebody can help us with it.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 04:12 AM
Somebody effectively helped us!
Have a good day 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 12:45 AM
We reported this to Hi and received a response which worked for us:
"Please be informed that we have recently introduced a new property in order to control http connection timeouts for improved performance throughout the instance.
- Property:
glide.http.outbound.max_timeout
- Description: Specifies the number of seconds that RESTMessageV2 and SOAPMessageV2 APIs wait for a response from a synchronous call. The maximum value is 30 seconds.
RESOLUTION: To define a timeout longer than 30 seconds, set the glide.http.outbound.max_timeout.enabled
system property to false and use the waitForResponse() method to set the timeout (after setting that property to false you should be able to set different timeouts with waitForResponse()). For examples, see Asynchronous RESTMessageV2 example: https://docs.servicenow.com/bundle/madrid-application-development/page/app-store/dev_portal/API_refe...
and Asynchronous SOAPMessageV2 example:
https://docs.servicenow.com/bundle/madrid-application-development/page/app-store/dev_portal/API_refe...
If glide.http.outbound.max_timeout.enabled is set to true and a value is passed in the waitForResponse() method, the system uses the smallest value from either the waitForResponse() method or the glide.http.outbound.max_timeout system property."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2019 02:22 AM
Hi Tom,
we also raised case to Hi but in three weeks there are no solution purpose yet...
The solution you linked works like a charm for us!!!
( on Kingston patch 14 and whit MID Server kingston-10-17-2017__patch14-02-27-2019_03-07-2019_1940)
Thanks a lot!
Laura