Legacy Knowledge Base
Published Sep. 10, 2025

Liferay application servers getting unresponsive while switching the database

Written By

Kanchan Bisht

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

  • The below exceptions have been observed in the Liferay application servers.  It's getting unresponsive while switching the database. 
  • ERROR [QuartzScheduler_PersistedQuartzSchedulerEngineInstance-ecmsndcappcp11617706920289_ClusterManager][PortalJobStore:3641] Couldn't rollback jdbc connection. This connection has been closed.
    org.postgresql.util.PSQLException: This connection has been closed.
    at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:766)
    at org.postgresql.jdbc.PgConnection.rollback(PgConnection.java:773)
    at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:1105)
    at org.jboss.jca.adapters.jdbc.WrappedConnection.rollback(WrappedConnection.java:863)
    at sun.reflect.GeneratedMethodAccessor740.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  • There is a setup of two nodes of PostgreSQL database along with a Virtual IP address between both database nodes in which while switching over of database, the application servers remain unresponsive until restarts the Liferay application server.

Environment

  • Liferay DXP 7.0

Resolution

  • Liferay is not tested with any Database clustering solutions. However, it can be considered to be working if the database cluster is seen as a single database connection at the JNDI level. The reason why Liferay is failing after the switching of the DB is that Liferay builds up a connection pool towards the database server and maintains it while the system is up and running. If the database cluster works in the background as a single robust database server it shouldn't cause any issues. 
    Currently, in this scenario, what's happening here is that the PG Cluster does not replicate the connections, so when one of the nodes goes away, the connections from the connection pool gets unusable and in the logs, the below exception can be observed
    org.postgresql.util.PSQLException: This connection has been closed.
    That's the reason the system remains without a working database connection, and there's nothing Liferay could do about it without restart.
  • In this matter need to connect to the DB admin for the same to see what would be right parameters or configuration needs to be set based on the affected environment architecture as this needs to be done at the DB level and not at Liferay level.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base