May 12, 2016

SAP Java Applications - No connection to data source * available. All * pooled connections are in use and * connection requests are currently waiting


A client developing custom Java applications faced the following error while testing one of their apps:



[EXCEPTION]
 com.sap.sql.log.OpenSQLException: No connection to data source SAPSIDDB available. All 50 pooled connections are in use and 7 connection requests are currently waiting. The connection pool size might need to be adjusted.






Solution basically consisted on two parts:

  1. Code optimization
  2. Adjusting the following parameter on the template of the configtool: