Legacy Knowledge Base
Published Sep. 10, 2025

Logging Mechanism for Liferay Database Pool

Written By

Ankit Gupta

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

1. How to increase the logging around connection pool which can help to understand the activities within the connection pool?
2. What other container-managed database connection pool can be used instead of c3p0?

Environment

  • Liferay 6.2

Resolution

1. How to increase the logging around connection pool which can help to understand the activities within the connection pool?

Ans: Below steps can be followed to increase the logs for the connection pool.
a) Go to Control > Configuration > Server Administration
b) Under Server Administration, go to Log Level.
c) Search for "com.liferay.portal.dao.jdbc.pool". Increase the log level for the connection pool as per your business requirement. 

2. What other container-managed database connection pool can be used instead of c3p0?

Ans:  Other then c3po, dbcp, and tomcat can be used, by default c3p0 is used. Following property in the portal-ext.properties can be used to use the other provider.

# Liferay can use C3PO, DBCP, or Tomcat for connection pooling. See
    # com.liferay.portal.dao.jdbc.util.DataSourceFactoryBean for the actual
    # implementation. It is important to understand the strengths and weaknesses
    # of each provider so that you can choose the best one that fits your
    # deployment scenario. Provider specific properties can also be passed along
    # directly to the provider. For example, the property
    # "jdbc.default.acquireIncrement" is read by C3PO, and the property
    # "jdbc.default.maxActive" is read by DBCP.
    #
    # The default provider is C3PO.
    #
    jdbc.default.liferay.pool.provider=c3po
    #jdbc.default.liferay.pool.provider=dbcp
    #jdbc.default.liferay.pool.provider=tomcat
Did this article resolve your issue ?

Legacy Knowledge Base