Skip to main content
Planview Customer Success Center

Intermittent: cannot connect to Web API / no more connections in pool (2012)

SYMPTOMS
There are intermittend connection issues when the API is used. It fails sometimes with some connection error but a few minutes later the API is working again, without having made any changes or restarting anything.

ERROR (1)
Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

This error message can appear in your API logs (COM/WS) and also in the windows event logs.

ERROR (2)
When there is no explicit message about getting a connection from the pool, please check for this pattern (or similar):

7:26:01 AM Level3: WebLoginId interface
7:26:01 AM Level8: WSConnection.Login(userLoginId) Finally
7:36:01 AM Level2: Error: Number= -1 Message= Operation failed (system error).
7:36:01 AM Level2: StackTrace:    at Changepoint.CommonServices.DataAccess.DBAccess.ExecuteDataSet(... )
   at Changepoint.CPWebService.WSConnection.getWebPassword(String webLoginId)
7:36:01 AM Level1: Log for this source is end.

7:26:01 AM Level1: Source: Changepoint.CPWebService.WSLogin.Login
7:26:01 AM Level3: userLoginId: interface
7:36:01 AM Level1: Log for this source is end.

Important here is we can see that between the beginning of the operation at 7:26:01 and the end of the operation at 7:36:01 there are exactly 10 minutes. It might be a different duraition like 1 minute or 5 minutes, corresponding to the connection timeout specified in the API connection settings.
Although here the error doesn't mention the connection pool, when the system waits exactly the amount of time corresponding to the connection time out, then it can be about the pool.


REASON
This behaviour has been observed on a few systems only, although it is not clear what causes it. When it occurs it means that there is an error with reusing connections to the SQL server from the systems connection pool.

RESOLUTION
A new value MAX POOL SIZE=1000 needs to be added into the API connection string. Please contact Changepoint support for instructions as our standard tool (Login Settings.exe) cannot be used to specify this parameter.