Warning when searching structures with cache mode

User 818520b6b8

13-04-2005 06:03:02

Hi all,





when I search structures using the cache option (setStructureCaching(true)), I get the following warning:





WARNING: Table "JCHEM.STRUCTURES" could not fit into structure cache.





I have custom columns in this table. Could that be the cause?





Thanks.

ChemAxon 9c0afc9aaf

13-04-2005 09:46:01

Hi,





Custom columns are not cached, so they are not related to this issue.





You have to specify a higher heap memory limit for the Java Virtual Machine with the -Xmx parameter.





You should estimate around 100 MB for 1 million average structures, and you should also allow an other 100 MB or so for temporary allocations.





If you are using Tomcat , please read this page for details:


http://www.jchem.com/doc/admin/tomcat.html





Best regards,





Szilard

User 818520b6b8

13-04-2005 11:25:52

I cannot post the number of structures we have in our database, but I can tell you that the rule 100MB for 1 million structures is not working.





Imagine we have 30,000 structures, I set a heap size of 256Mb and is still giving the same error.





Thanks.

ChemAxon 9c0afc9aaf

13-04-2005 11:37:58

Hi,





Do you use Tomcat ?





If you are using the API from an other environment, what is it ?


(java program run from command line, application server, etc.)





Please don't forget to restart Tomcat after the changes to -Xmx.





Please also note, that in an ideal case all of your tables should fit into the cache.


If they don't, JChem tries to drop tables from the cache which are not being searched at the moment.


If it fails to free up enough memory this way, you also get this message.





Szilard

User 818520b6b8

13-04-2005 12:38:30

I'm using Tomcat 5.0.28, and the API is called from Windows 2K.





Thanks.

ChemAxon 9c0afc9aaf

15-04-2005 17:45:34

Hi,
Quote:
I'm using Tomcat 5.0.28, and the API is called from Windows 2K.
I do not quite understand this.





Is your code running inside Tomcat, or an other application ?





Szilard

User 818520b6b8

18-04-2005 06:25:21

Hi,





my code is a Java Swing based GUI using your API. It's not running on tomcat, it's running on my laptop.





Thanks.

ChemAxon 9c0afc9aaf

18-04-2005 06:33:10

Hi,





In this case you should allow more heap memory for your program.





For example the following provides 512 megabytes for my.Application:





java -Xmx512m my.Application





Best regards,





Szilard