Long-running SOAP request support

The ServiceNow platform supports long-running SOAP requests by preventing socket timeouts due to inactivity of the network connection while the requests are in process.

This functionality improves the efficiency of the ODBC driver when requesting large numbers of records, doing aggregate queries, or using order by expressions that require sorting.

By default, ServiceNow provides timeout protection for Web Services clients provided by ServiceNow such as the ODBC driver and the MID Server. You can add time timeout protection to customer developed Web Services with the parameters described below.

Timeout Protection

Web Services clients receive a 307-Temporary Redirect to keep long sessions alive and prevent a timeout due to socket inactivity. A 307-Temporary Redirect causes Web Services clients which support the status code to repeat their last request to the location specified in the HTTP location header. The value of the location header sent by ServiceNow is the same URL that the Web Services client originally specified. The use of 307-Temporary Redirects is WS-I compliant.

A Web Service request that exceeds the timeout limit (glide.soap.request_processing_timeout) can only receive a 307-Temporary Redirect when all of these are met:
  • The value of glide.soapprocessor.allow_long_running_threads is true
  • The request includes a redirectSupported=true URL parameter
  • The Request is session-aware (supports HTTP cookies)
If any of these conditions is not met, the Web Service client receives a 408 Request Timeout error.
Note: To ensure that applications experience a socket timeout rather than a 408 Request Timeout, set the glide_soap_request_processing_timeout property to a value larger than the shortest socket timeout setting in effect for the connection between the application and the ServiceNow instance (300 seconds for hosted instances).