IJC 2.3.1 Out of Memory Error

User c92fc0bce4

11-11-2008 17:08:37

I was building a database of structures by importing SD files. As I neared the 2 million structure level I began to receive out of memory error messages on the final stage of import but all of the structures were loaded in the grid view. After each of these events I would close the application and then restart before loading the next set. At about 2.2 million structures, I could not get IJC to load. Is there a limit on the size of the database? Is there a way to recover back to the last successful load? IJC running on PC under VISTA, 3 GB memory. Error message follows:





java.lang.OutOfMemoryError: Java heap space


at java.util.Arrays.copyOf(Unknown Source)


at java.util.Arrays.copyOf(Unknown Source)


at java.util.ArrayList.toArray(Unknown Source)


at java.util.ArrayList.<init>(Unknown Source)


at com.im.df.impl.db.ResultSetImpl$VS.updateIdsAndSelectionInternal(ResultSetImpl.java:545)


at com.im.df.impl.db.ResultSetImpl$VS.setIds(ResultSetImpl.java:534)


at com.im.df.impl.db.ResultSetImpl$VS.access$200(ResultSetImpl.java:385)


at com.im.df.impl.db.ResultSetImpl.applyQueryInternal(ResultSetImpl.java:192)


at com.im.df.impl.db.ResultSetImpl.<init>(ResultSetImpl.java:88)


at com.im.df.impl.db.DBSchemaDataProviderImpl.getDefaultResultSet(DBSchemaDataProviderImpl.java:88)


at com.im.ijc.core.api.views.AbstractViewTopComponent$8.phase1InRequestProcessor(AbstractViewTopComponent.java:828)


at com.im.df.util.BackgroundRunner.processTheTask(BackgroundRunner.java:112)


at com.im.df.util.BackgroundRunner$1.run(BackgroundRunner.java:79)


at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)


at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

ChemAxon fa971619eb

11-11-2008 17:20:12

When handling very large datasets like this you should definitely increase the amount of memory that is available to IJC.


To see how to do this look here:


http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/changing_user_settings.html#startup


and for more info about the topic see here:


http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/tips_and_tricks/memory_usage.html





For 2 million structures I would suggest at least 400MB, or more if you have it.





You can edit this value in the configuration file if you need.


Look for the file:


<ijc_installation_dir>/etc/instantjchem.conf


and look for the line starting with


default_options


and edit the value for the -J-Xmx setting to something like:


-J-Xmx400m








If your import had completed then once you increase the memory setting you should see all the data that was imported.








Tim

User c92fc0bce4

11-11-2008 20:10:56

Thanks. Using the inforamtion provided and reading the links, I was able to change the starting and max memory settings. This solved the problem.

ChemAxon fa971619eb

11-11-2008 20:19:06

OK, good.


I also mention that IJC 2.4 will contain some improvements in handling very large datasets.





Tim