Resolving ECCResponseTimeoutException: How to Increase REST API Timeout in ServiceNow
- nathanlee142
- Mar 20
- 3 min read
Updated: Mar 29

ServiceNow users frequently leverage REST APIs to integrate external systems. However, a common challenge arises when these APIs encounter timeouts, specifically the ECCResponseTimeoutException error. This issue occurs when ServiceNow does not receive a timely response from external endpoints, often due to the default timeout settings being too restrictive. This guide addresses the ECCResponseTimeoutException error, explains its common causes, and provides step-by-step solutions to effectively adjust REST response timeouts in ServiceNow.
Understanding ECCResponseTimeoutException
When using REST APIs in ServiceNow, the ECCResponseTimeoutException error typically occurs with a message like:
"com.glide.ecc.ECCResponseTimeoutException: No response for ECC message request with sysid after waiting for 30 seconds in ECC Queue."
This error indicates that ServiceNow has stopped waiting for a response after its default timeout period of 30 seconds. Even if you attempt to set a higher HTTP timeout within your script, the default ECC queue timeout may override your setting, leading to persistent timeout errors.
Common Causes:
Default ServiceNow ECC Queue timeout (30 seconds) overriding custom HTTP timeouts.
Improper configuration of system properties related to HTTP timeouts.
MID Server latency or network delays causing slow responses.
Step-by-Step Solution for Increasing REST Response Timeout
To resolve this timeout issue, follow these detailed steps:
Step 1: Adjust System Properties
ServiceNow uses system properties to manage REST API timeout configurations.
You need to adjust the following key properties:
glide.http.outbound.max_timeout
Defines the maximum duration (in seconds) ServiceNow waits for responses from synchronous REST calls. Default is 30 seconds.
glide.http.outbound.max_timeout.enabled
Determines if the above maximum timeout property is enforced.
(Optional) glide.http.outbound.stream_timeout
Defines the maximum time (in seconds) ServiceNow waits while reading streaming data from an external system. You may need to adjust this value when downloading large files or processing real-time data streams.
(Optional) glide.http.outbound.connection_timeout
Defines the maximum time (in milliseconds) ServiceNow waits for an external system to respond after establishing a connection. You may need to increase this value if there are significant network delays or if the external system responds slowly.
Not all properties need to be changed.
Adjust them based on expected API response times to ensure smooth integration.
To allow longer timeouts:
Navigate to sys_properties.list in ServiceNow.
Create or set glide.http.outbound.max_timeout.enabled to false.
Or If glide.http.outbound.max_timeout.enabled is true, adjust the timeout accordingly to allow higher limits. Ensure glide.http.outbound.max_timeout is set to a value greater than 30 seconds.
This change allows scripts to specify custom timeout durations longer than 30 seconds.
Step 2: Use Async REST Calls with waitForResponse()
Instead of synchronous REST calls, consider asynchronous calls to effectively handle longer responses:
var endpoint = "https://myEndpoint";
var authProfile = "authentication_profile_sys_id";
var midServer = "myMIDServer";
var restRequest = new sn_ws.RESTMessageV2();
restRequest.setHttpMethod("get");
restRequest.setEndpoint(endpoint);
restRequest.setAuthenticationProfile("basic", authProfile);
restRequest.setMIDServer(midServer);
try {
var asyncResponse = restRequest.executeAsync();
asyncResponse.waitForResponse(60000);
// Timeout set to 60000 milliseconds(60 seconds)
gs.info("Status Code: " + asyncResponse.getStatusCode());
} catch (error) {
gs.error("Error: " + error.message);
}
By leveraging executeAsync() and waitForResponse(), you can effectively manage longer-running REST calls.
Practical Use Case: If integrating with external APIs known to respond slowly (e.g., over 30 seconds), this approach is ideal. For instance, retrieving large datasets or performing complex calculations externally.
Alternative Solutions:
Check MID Server performance regularly.
Optimize external APIs or endpoints to respond faster.
Conclusion
ECCResponseTimeoutException errors often result from ServiceNow’s default 30-second timeout configuration. Adjusting system properties and using asynchronous REST calls resolves this challenge, ensuring reliable integrations. Always set timeout values thoughtfully to match the expected response times from external systems.
Actionable Next Steps:
Configure the timeout system properties as described.
Implement asynchronous REST call scripts where necessary.
Continuously monitor API response times and optimize external endpoints where possible.