SAP PO – problem with DBPool

Sometimes You can observe application is not accessible or server nodes hang. The dbpool connection error below logged into the server default traces.  


[EXCEPTION]
com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException occurred in method ConnectionFactoryImpl.getConnection(): javax.resource.ResourceException: (Failed in component: dbpool, BC-JAS-TRH) Cannot create connection. Possible reasons: 1)Maximum allowed connections to DB or EIS is reached. You can apply CSN Note 719778 in order to check and resolve connection leaks. 2) Configuration to DB/EIS is wrong or DB/EIS is temporary unreachable. 3) Connections are not enough for current load.
        at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:140)
        at com.sap.engine.library.monitor.history.persistence.DBAgregationWriter.writeAgregate(DBAgregationWriter.java:191)
        at com.sap.engine.library.monitor.history.persistence.DBAgregationWriter$DBWriterJob.run(DBAgregationWriter.java:98)
        at java.lang.Thread.run(Thread.java:836)
Caused by: javax.resource.ResourceException: (Failed in component: dbpool, BC-JAS-TRH) Cannot create connection. Possible reasons: 1)Maximum allowed connections to DB or EIS is reached. You can apply CSN Note 719778 in order to check and resolve connection leaks. 2) Configuration to DB/EIS is wrong or DB/EIS is temporary unreachable. 3) Connections are not enough for current load.
        at com.sap.engine.services.connector.jca.ConnectionHashSet.match(ConnectionHashSet.java:230)
        at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:295)
        at com.sap.engine.services.connector.jca.ShareableConnectionManager.allocateConnection(ShareableConnectionManager.java:54)
        at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:63)
        ... 3 more
Caused by: com.sap.engine.services.dbpool.exceptions.BaseResourceException: SQLException is thrown by the pooled connection: com.sap.sql.log.OpenSQLException: No connection to data source XXXXXXX available. All 50 pooled connections are in use and 126 connection requests are currently waiting. The connection pool size might need to be adjusted.
        at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:230)
        at com.sap.engine.services.connector.jca.ConnectionHashSet.match(ConnectionHashSet.java:221)
        ... 6 more
Caused by: com.sap.sql.log.OpenSQLException: No connection to data source XXXXXX available. All 50 pooled connections are in use and 126 connection requests are currently waiting. The connection pool size might need to be adjusted.
        at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:83)
        at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:122)
        at com.sap.sql.connect.datasource.DBDataSourceImpl.get(DBDataSourceImpl.java:298)
        at com.sap.sql.connect.datasource.DBDataSourceImpl.getConnection(DBDataSourceImpl.java:144)
        at com.sap.engine.core.database.impl.DatabaseDataSourceImpl.getConnection(DatabaseDataSourceImpl.java:37)
        at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:190)
        ... 7 more

Solution

Probably problem is with the pool size of the adapter. It is not enough according to the current load of the system or the specified time to wait for connection is not enough according to the pool size and system load.

Try change below parameters:

  1. Start configtool – cluster-data – template – instance – services – dbpool
  2. Set dbpool property values as follows:
sysDS.maximumConnections = 250
sysDS.connectionLifetime=90

3. Restart the system.

If the problem still exist check for any performance issue, bottleneck, long running queries, outdated statistics, etc on database side. Alternatively think about scaling the AS Java with more server nodes and/or more instances. 

Copyright © 2021. SAPBasisWorld.com Privacy Policy