Query search out of memory

User 4393c056f4

12-04-2012 14:01:04

Dear Chemaxon Support,


I have a problem with query search. I'm using 5.9.2 and it warnig me that:


 


<<INFO [com.im.ijcs.impl.query.DefaultQueryService]: Query execution exception


chemaxon.jchem.db.DatabaseSearchException: ERROR: Table "APP.X11111111111111111111111" could not fit into structure cache (out of memory).


Please visit http://www.chemaxon.com/jchem/doc/admin/Performance.html#cacheSize and


http://www.chemaxon.com/jchem/javaFAQ.html#outofmemory


        at chemaxon.jchem.db.JChemSearch.loadCache(JChemSearch.java:2818)


        at chemaxon.jchem.db.JChemSearch.search1(JChemSearch.java:2449)


        at chemaxon.jchem.db.JChemSearch.search(JChemSearch.java:2280)


        at chemaxon.jchem.db.JChemSearch.access$3000(JChemSearch.java:165)


        at chemaxon.jchem.db.JChemSearch$SearchThread.run(JChemSearch.java:1031)


Caused: org.springframework.dao.InvalidDataAccessResourceUsageException: Exception occurred when executing JChem search; nested exception is chemaxon.jchem.db.DatabaseSearchException: ERROR: Table "APP.X11111111111111111111111" could not fit into structure cache (out of memory).


Please visit http://www.chemaxon.com/jchem/doc/admin/Performance.html#cacheSize and


http://www.chemaxon.com/jchem/javaFAQ.html#outofmemory


        at com.im.ijcs.impl.query.JChemExecutor.executeJChemSearch(JChemExecutor.java:288)


        at com.im.ijcs.impl.query.JChemExecutor.execute(JChemExecutor.java:166)


        at com.im.ijcs.impl.query.JChemExecutor.run(JChemExecutor.java:377)


        at com.im.ijcs.impl.query.Executor.visitStructureQuery(Executor.java:174)


        at com.im.ijcs.impl.query.Executor.visitSqlQuery(Executor.java:207)


        at com.im.ijcs.impl.query.Executor.execute(Executor.java:165)


        at com.im.df.server.local.LocalQueryExecutor.access$001(LocalQueryExecutor.java:26)


        at com.im.df.server.local.LocalQueryExecutor$1.doInTransactionWithoutResult(LocalQueryExecutor.java:60)


        at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)


        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)


        at com.im.df.server.local.LocalQueryExecutor.execute(LocalQueryExecutor.java:58)


        at com.im.ijcs.impl.query.DefaultQueryService.findImpl(DefaultQueryService.java:138)


        at com.im.ijcs.impl.query.DefaultQueryService$FindExecutor.call(DefaultQueryService.java:117)


        at com.im.ijcs.impl.query.DefaultQueryService$FindExecutor.call(DefaultQueryService.java:101)


        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)


        at java.util.concurrent.FutureTask.run(Unknown Source)


        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)


        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)


        at java.lang.Thread.run(Unknown Source)...>>>


I have already visited the pages in the forum, that offer some solution to the problem, but unfortunately nothing worked. Here below some System Info: 


 


 


 


  Product Version         = Instant JChem 5.9.2


  Operating System        = Windows Vista version 6.0 running on x86


  Java; VM; Vendor        = 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02; Sun Microsystems Inc.


  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_26-b03


  Java Home               = c:\Program Files\ChemAxon\InstantJChem\jre


  System Locale; Encoding = uk_UA (instantjchem); Cp1251


 


Please help me!!!Thank you in advance.


 

ChemAxon 60ee1f1328

12-04-2012 15:38:26

Hi 


 


Can you please provide a count (*) for your JCHEM table in derby please ?


 


If your derby table is so large you might need consider several options such as 64 bit system or use a different table type where by the search cache is located on the server - clearly there are implications for this and so first we would like to replicate first and eliminate any possible bug (leaks).


 


Thanks,


 


Daniel.

ChemAxon 60ee1f1328

12-04-2012 15:46:02

You could of course also check your IJC memory settings are maximised ?


Please try 1024 or above ?


You can change this directly from the interface or from the tools -> options (Other settings / Misc tab)


 


Thanks,


dsb

User 4393c056f4

13-04-2012 07:11:28

Thank's for reply.


I just tried to change memory settings to 1024, but i received an error:


 


java.lang.NullPointerException


at org.netbeans.core.startup.preferences.NbPreferences.put(NbPreferences.java:158)


at com.im.ijc.core.options.StartupSettingsOptionsPanelController.applyChanges(StartupSettingsOptionsPanelController.java:100)


at org.netbeans.modules.options.advanced.Model$DelegatingController.applyChanges(Model.java:296)


at org.netbeans.modules.options.advanced.Model.applyChanges(Model.java:181)


at org.netbeans.modules.options.advanced.AdvancedPanel.applyChanges(AdvancedPanel.java:106)


at org.netbeans.modules.options.advanced.AdvancedPanelController.applyChanges(AdvancedPanelController.java:77)


at org.netbeans.modules.options.CategoryModel$Category.applyChanges(CategoryModel.java:390)


at org.netbeans.modules.options.CategoryModel$Category.access$1000(CategoryModel.java:319)


at org.netbeans.modules.options.CategoryModel.save(CategoryModel.java:218)


at org.netbeans.modules.options.OptionsPanel.save(OptionsPanel.java:210)


at org.netbeans.modules.options.OptionsDisplayerImpl$OptionsPanelListener.actionPerformed(OptionsDisplayerImpl.java:334)


at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1295)


at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)


at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)


at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)


at javax.swing.DefaultButtonModel.setPressed(Unknown Source)


at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)


at java.awt.Component.processMouseEvent(Unknown Source)


at javax.swing.JComponent.processMouseEvent(Unknown Source)


at java.awt.Component.processEvent(Unknown Source)


at java.awt.Container.processEvent(Unknown Source)


at java.awt.Component.dispatchEventImpl(Unknown Source)


at java.awt.Container.dispatchEventImpl(Unknown Source)


at java.awt.Component.dispatchEvent(Unknown Source)


at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)


at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)


at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)


at java.awt.Container.dispatchEventImpl(Unknown Source)


at java.awt.Window.dispatchEventImpl(Unknown Source)


at java.awt.Component.dispatchEvent(Unknown Source)


at java.awt.EventQueue.dispatchEventImpl(Unknown Source)


at java.awt.EventQueue.access$000(Unknown Source)


at java.awt.EventQueue$1.run(Unknown Source)


at java.awt.EventQueue$1.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)


at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)


at java.awt.EventQueue$2.run(Unknown Source)


[catch] at java.awt.EventQueue$2.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)


at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.pumpEvents(Unknown Source)


at java.awt.EventDispatchThread.run(Unknown Source)



 


I have arond 5 million rows in my base. Maybe it is too much for this application? Please advise.


I attached log file for todays session.

ChemAxon 3b366b17e5

13-04-2012 07:33:33

I don't know how can be software released with such stupid bugs :(. We will fix it in 5.10. May be earlier.  You can also change the memory settings in plain text editor. How to do it when you want to increase memory heap to 1024MB:


1. open ${ijc.installation.dir}/etc/instantjchem.conf file


2. change -J-Xmx512m to -JXmx1024m on line


default_options="--branding instantjchem -J-Xms48m -J-Xmx512m -J-XX:MaxPermSize=196m -J-Dderby.system.home=derby -J-Dnetbeans.logger.console=true -J-ea -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-DuseGtk=false -J-Dorg.netbeans.core.TimeableEventQueue.report=86400000"


3. save file

User 4393c056f4

13-04-2012 10:35:20

Thank you for your help. Now it works