jcman x - out of memory

User 6b1e802ce9

10-11-2010 18:21:35

I want to export all the structures in the structure table in jchem.  The system runs out of memory using JChem Manager, as well as, using jcman command line.  How else can I accomplish the task?


 


C:\Program Files\ChemAxon\JChem5_3_6\bin>jcman x structure c:\11102010.sdf
Exporting structures into c:\11102010.sdf ...
java.lang.OutOfMemoryError: Java heap space
        at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:1585)
        at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1409)
        at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2883)
        at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:476)
        at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2576)

        at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1757)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2167)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2642)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2571)
        at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1464)
        at chemaxon.jchem.db.SQLToFileHandler.<init>(SQLToFileHandler.java:135)
        at chemaxon.jchem.db.Exporter.init(Exporter.java:504)
        at chemaxon.jchem.db.Exporter.writeAll(Exporter.java:361)
        at chemaxon.jchem.Command.exportToFile(Command.java:1497)
        at chemaxon.jchem.Command.run(Command.java:658)
        at chemaxon.jchem.Command.main(Command.java:216)
C:\Program Files\ChemAxon\JChem5_3_6\bin>
C:\Program Files\ChemAxon\JChem5_3_6\bin>

ChemAxon e274e1bada

10-11-2010 18:47:54

Hi,


Please try to increase the usable memory size in the JVM with the -XmX parameter to the correct value.


You can find some information about the memory increasing and memory need of JChem Search in the JChem FAQ:
http://www.chemaxon.com/jchem/JavaFAQ.html#outofmemory />


Regards, Edvard

User 6b1e802ce9

17-11-2010 19:59:34

I tried increasing to the max the machine can handle but I still get an memory error.  Do you think the problem can be that I am exporting 28 million structures into one sdf?

ChemAxon e274e1bada

17-11-2010 22:27:23

Hi,


Do you use the embedded MySql driver in JChem, or do you use your own driver?
The way the MySQL driver works is a bit strange. By default it
fetches the entire resultset. You have huge structure set, and this behaviour may cause the OOM error.


We are investigating the possible solutions for this problem, but a possible workaround would be if you try to told the JDBC driver to use a serverside
cursor. You can do this with parameters to the driver. Something
like this:



jdbc:mysql://localhost/mydb?useCursorFetch=true&defaultFetchSize=1000


Regards, Edvard

User 6b1e802ce9

24-11-2010 15:48:31

thank you!


this works