High Count Of Leaked Connection Count For Data source for the managed server where Conductor is deployed.
OnkarBangar27 opened this issue · 2 comments
I have deployed conductor v 3.9.2 war on one of my managed server on weblogic and that is pointing to PLATO-O data source.
And for that particular managed server I can see increasing leaked connection day by day for that particular data source.
Other managed server which are also pointing to that data source are not showing any leaked connection.
Can anyone help me with this?
I am getting following message:
_####<Sep 6, 2023 8:14:17,865 AM MMT> <Warning> <JDBC> <fcubsprodapp01> <WLS_CONDUCTOR_1> <[ACTIVE] ExecuteThread: '300' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <01c23b6c-6303-44c7-9aaa-df93830da3bd-0025e0fa> <1693964657865> <[severity-value: 16] [rid: 0] > <BEA-001592> <Forcibly releasing inactive connection "weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@392ebaa0" back into the data source connection pool "PLATO-O".>_
Ensure that you are properly closing database connections using a try-with-resources block or finally block to guarantee closure, like this:
try (Connection connection = dataSource.getConnection()) { // Use the connection for database operations } catch (SQLException e) { // Handle exceptions }
Utilize the try-with-resources statement in Java to automatically close resources (like connections) at the end of a block of code. This ensures proper resource cleanup.
try (Connection conn = dataSource.getConnection(); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(sql)) { // Use the connection, statement, and result set } catch (SQLException e) { // Handle the exception }