Connection leak when upgrading tables

User 57295192cc

17-10-2012 13:31:22

Hi,


There seem to be a database connection leak somewhere in the update process started by chemaxon.jchem.db.Updater.performCurrentUpdate(). I noticed that after an update some file handles (for HSQL database files) were left open.


Further tests showed that Updater.performCurrentUpdate() opens 4 new connections to the database using the info in the supplied
ConnectionManager (but it doesn't use the connection already there). The first one of the new connections is not closed before returning. Unfortunately it cannot be closed from client code either, as we have no handle for it.


This is the call stack leading to opening the problematic connection:


at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at
chemaxon.util.ConnectionHandler.connectToDatabase(ConnectionHandler.java:429)
at chemaxon.jchem.db.Regenerator.run(Regenerator.java:332)
at
chemaxon.jchem.db.UpdateHandler.recalculateTable(UpdateHandler.java:2994)
at
chemaxon.jchem.db.UpdateHandler.recalculateTable(UpdateHandler.java:2955)
at chemaxon.jchem.db.Updater.regenerateTables(Updater.java:1308)
at chemaxon.jchem.db.Updater.performCurrentUpdate(Updater.java:309)
at chemaxon.jchem.db.Updater.performCurrentUpdate(Updater.java:277)


JChem version: 5.11.1

Database: HSQLDB 2.2.9

Any help would be appreciated.

Many thanks,

Pal

ChemAxon d9cc14700b

18-10-2012 07:20:20

Hi Pal,


We noticed this problem recently and fixed it, but it has not yet been released. I will let you know if it's released.


Best Regards,


Gabor

User 57295192cc

18-10-2012 09:48:57

Hi Gabor,

Thanks very much for the quick answer, I'm glad it's fixed already! Looking forward to the release...

Best regards,

Pal

ChemAxon d9cc14700b

26-10-2012 09:07:10

Hi Pal,


 


The fix will be released in 5.11.4.


 


Best Regards,
Gabor