Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Long-running SOAP request support

Log in to subscribe to topics and get notified when content changes.

Long-running SOAP request support

The Now 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 system properties.

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 conditions 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).
  • The number of redirects has not exceeded the value set by glide.soap.max_redirects.
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).
Table 1. Long-running SOAP request properties
Property Description
glide.http.connection_timeout Specify the maximum number of milliseconds an outbound HTTP request (such as Web Services) will wait to establish a connection.
  • Type: integer
  • Default value: 10000 (10 seconds)
  • Location: system properties [sys_properties] table
glide.http.timeout Specifies the maximum number of milliseconds to wait before an outbound transaction times out.
  • Type: integer
  • Default value: 175000 (175 seconds)
  • Location: Add to system properties [sys_properties] table
glide.soap.max_redirects Specifies the maximum number of redirects the server sends to the client before the soap request is timed out.
  • Type: integer
  • Default value: 20
  • Location: system properties [sys_properties] table
glide.soap.request_processing_timeout Specify the maximum number of seconds an inbound SOAP request has to finish processing before the connection times out. This property computes a default value from the value of the property glide.http.timeout divided by 1000.

This property accepts values 5–1200 seconds (20 minutes).

Customers might have network infrastructure (such as proxy servers) in place which implement a shorter timeout. In this case, a socket timeout may occur unless this property is set to a shorter value. Set this property to a value several seconds less than the shortest socket inactivity timeout in effect anywhere in the network path between the client application and the instance.

  • Type: integer
  • Default value: 60
  • Location: system properties [sys_properties] table
glide.soapprocessor.allow_long_running_threads Enables or disables a 307-Temporary Redirect when the request includes a redirectSupported=true parameter. The default setting is true (enabled).
glide.soapprocessor.max_long_running_threads Controls the maximum number of long-running SOAP threads which can run at any one time. The default value for this property is determined dynamically based on the number of SOAP semaphores configured. It should not be necessary to change this value.