Notifications

293 views

ODBC Driver Requests Exceeding Maximum Concurrent Connections

 

Problem
ODBC driver connections are converted to SOAP calls before they are sent to ServiceNow. As of Helsinki, instances are configured to handle concurrent SOAP calls via the API_INT semaphore pool. Prior to Helsinki, they were handled by the Default semaphore pool. The number of SOAP calls that can be processed at any time is limited by the number of semaphores.
 
ServiceNow ships with 4 API_INT semaphores per node. Therefore, the limit of concurrent ODBC driver calls is 4 multiplied by the number of nodes in the instance.
 
The number of semaphores by pool can be seen under Semaphore Sets > API_INT in your instance's stats page:  
{your instance name}.service-now.com/stats.do

  

Symptoms
If the semaphore pools are saturated, new requests are queued up to 150 waiting requests. After the queue of 150 waiting requests is met, additional requests are rejected with the HTTP code 429.
 
If a single session exceeds 5 waiting requests, any new request to the same session will fail with HTTP code 202. The ODBC driver reuses sessions and therefore each running instance of the driver is stuck to a single node.
 
Keep in mind that the API_INT pool is shared by all type of inbound integrations to ServiceNow, REST, JSON, SOAP, etc. In the event that some other integration saturates the API_INT semaphore pool, the ODBC driver is blocked from processing until a semaphore becomes available.
 
See KB0564204 (Troubleshooting Inbound Integrations performance) for more details.
Cause
If the semaphore pool that handles SOAP requests becomes saturated, new inbound requests are queued until either the queue is overloaded (150) or the session waiters limit is hit (5).

 


Resolution
Essentially the solution here is simple, do not send more ODBC queries that can be processed simultaneously. There is no single magic bullet to solve this issue but here is a recommended approach.

 

To avoid exceeding the limit:

  1. Ensure that the ODBC queries run quickly. Before taking any other course of action, check the stats.do page and if the API_INT semaphore is busy processing long running ODBC queries, find out how to optimize those queries - Troubleshooting ODBC driver issues - KB0538943
  2. If you have optimized the ODBC queries as far as you can get them, try breaking the queries into smaller chunks and running them in smaller groups over longer periods of time
  3. If you are getting 202 responses, try using multiple simultaneous ODBC clients. Each client will receive its own Java session object, thus allowing you to bypass the limit of 5 session waiters.
  4. If you are certain that you have done all you can to keep ODBC queries optimized and spreading them out over time, contact ServiceNow support to see if you need more nodes.

Article Information

Last Updated:2017-07-31 06:14:46
Published:2017-07-31
ODBC connections.png