Symptom
The JDBC pool is limited to 90 active connections by default in Commerce Cloud but can also be configured to another value with the property db.pool.maxactive. Regardless of the amount configured, it is important to monitor the db pool usage and troubleshoot issues resulting from it reaching its maximum value.
When the JDBC connection pool is exhausted, any thread that needs to establish a connection to the database in order execute a query or transaction will have to wait until a connection can be borrowed from the pool. This can lead to errors like the ones below and general performance degradation for the affected servers.
java.lang.IllegalStateException: could not switch tenant to <<master>>
[Registry] cannot activate tenant <<master>> since its database connection is currently lost
Timeout waiting for idle object
org.apache.commons.pool2.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:449)[+]
de.hybris.platform.jdbcwrapper.JDBCConnectionPool.borrowConnection (JDBCConnectionPool.java:113)[+]
java.util.AbstractList$Itr.next (AbstractList.java:358)[+]
de.hybris.platform.servicelayer.internal.model.impl.AbstractModelService.toModelLayer (AbstractModelService.java:67)[-]
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.convertObjectsToModels (ItemModelConverter.java:2577)
de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.readSingleAttribute (ItemModelConverter.java:1376)
de.hybris.platform.servicelayer.internal.converter.impl.ItemAttributeProvider.getAttribute (ItemAttributeProvider.java:108)
de.hybris.platform.servicelayer.model.ItemModelContextImpl.loadUnlocalizedAttribute (ItemModelContextImpl.java:285)
de.hybris.platform.servicelayer.model.ItemModelContextImpl.getValue (ItemModelContextImpl.java:245)
de.hybris.platform.servicelayer.model.ItemModelContextImpl.getPropertyValue (ItemModelContextImpl.java:261)
de.hybris.platform.cms2.model.contents.contentslot.ContentSlotModel.getCmsComponents (ContentSlotModel.java:140)
...
..
|
Using Dynatrace, it is possible to monitor the JDBC connection pool usage for all tomcat based services and investigate affected servers in more depth to identify the origin of the problem.
Read more...
Environment
SAP Commerce Cloud
Product
Keywords
KBA , CEC-SCC-CLA-ENV-EMG , Environment Management , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.