Tarun Chawla
02/13/2021, 12:25 PMFeb 13, 2021 5:28:37 PM com.impossibl.postgres.jdbc.ThreadedHousekeeper$HousekeeperReference cleanup
WARNING: Cleaning up leaked result-set
Allocation occurred @
at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeQuery(JdbcPreparedStatementImpl.kt:21)
at org.jetbrains.exposed.sql.Query.executeInternal(Query.kt:79)
at org.jetbrains.exposed.sql.Query.executeInternal(Query.kt:15)
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:61)
at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:129)
Due to this elephant sql is complaining about too many multiple connections. Am using exposed version 0.29.1 and latest pgjdbc-ng:0.8.6. Please help me understand the issue and share any code snippet if any.
Am opening db connection like below:
fun getDBConn(): Database? {
if (DBConnection == null) {
synchronized(this) {
if (DBConnection == null) {
try {
DBConnection = DataBaseConnection.connectWithDb(
Config.DB_URL,
Config.DB_DRIVER,
Config.DB_USERNAME,
Config.DB_PASSWORD
)
} catch (e: Exception) {
println("error while connecting to db $e")
return null
}
}
}
}
return DBConnection
}
hichem fazai
02/14/2021, 10:09 PMTarun Chawla
02/15/2021, 4:06 PM