See: http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html
Your Xmx specification is wrong I think. -Xmx2.0GB -Xmx2.0G -Xmx-2GB -Xmx-2G -Xmx-2.0GB -Xmx-2.0G -Xmx=2G all fail immediately when I try them from a command line on raw Java from a command prompt. Perhaps Tomcat is doing some magic here, I confess I don't speak very fluent Tomcat but the above link has a section on how to set memory for Tomcat that doesn't make me hopeful... Try -Xmx2G -Xmx2G no decimal place. No hyphen in front of the "2". no =..... 2012/3/15 François Schiettecatte <fschietteca...@gmail.com>: > FWIW it looks like this feature has been enabled by default since JDK 6 > Update 23: > > > http://blog.juma.me.uk/2008/10/14/32-bit-or-64-bit-jvm-how-about-a-hybrid/ > > François > > On Mar 15, 2012, at 6:39 AM, Husain, Yavar wrote: > >> Thanks a ton. >> ________________________________________ >> From: Li Li [fancye...@gmail.com] >> Sent: Thursday, March 15, 2012 12:11 PM >> To: Husain, Yavar >> Cc: solr-user@lucene.apache.org >> Subject: Re: Solr out of memory exception >> >> it seems you are using 64bit jvm(32bit jvm can only allocate about 1.5GB). >> you should enable pointer compression by -XX:+UseCompressedOops >> >> On Thu, Mar 15, 2012 at 1:58 PM, Husain, Yavar >> <yhus...@firstam.com<mailto:yhus...@firstam.com>> wrote: >> Thanks for helping me out. >> >> I have allocated Xms-2.0GB Xmx-2.0GB >> >> However i see Tomcat is still using pretty less memory and not 2.0G >> >> Total Memory on my Windows Machine = 4GB. >> >> With smaller index size it is working perfectly fine. I was thinking of >> increasing the system RAM & tomcat heap space allocated but then how come on >> a different server with exactly same system and solr configuration & memory >> it is working fine? >> >> >> -----Original Message----- >> From: Li Li [mailto:fancye...@gmail.com<mailto:fancye...@gmail.com>] >> Sent: Thursday, March 15, 2012 11:11 AM >> To: solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org> >> Subject: Re: Solr out of memory exception >> >> how many memory are allocated to JVM? >> >> On Thu, Mar 15, 2012 at 1:27 PM, Husain, Yavar >> <yhus...@firstam.com<mailto:yhus...@firstam.com>> wrote: >> >>> Solr is giving out of memory exception. Full Indexing was completed fine. >>> Later while searching maybe when it tries to load the results in memory it >>> starts giving this exception. Though with the same memory allocated to >>> Tomcat and exactly same solr replica on another server it is working >>> perfectly fine. I am working on 64 bit software's including Java & Tomcat >>> on Windows. >>> Any help would be appreciated. >>> >>> Here are the logs: >>> >>> The server encountered an internal error (Severe errors in solr >>> configuration. Check your log files for more detailed information on what >>> may be wrong. If you want solr to continue after configuration errors, >>> change: <abortOnConfigurationError>false</abortOnConfigurationError> in >>> null ------------------------------------------------------------- >>> java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space at >>> org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068) at >>> org.apache.solr.core.SolrCore.<init>(SolrCore.java:579) at >>> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137) >>> at >>> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) >>> at >>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072) >>> at >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4726) >>> at >>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) >>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) >>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at >>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at >>> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at >>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at >>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at >>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) >>> at >>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) >>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) at >>> org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at >>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at >>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at >>> org.apache.catalina.core.StandardService.start(StandardService.java:525) at >>> org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at >>> org.apache.catalina.startup.Catalina.start(Catalina.java:595) at >>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at >>> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at >>> java.lang.reflect.Method.invoke(Unknown Source) at >>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at >>> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: >>> java.lang.OutOfMemoryError: Java heap space at >>> org.apache.lucene.index.SegmentTermEnum.termInfo(SegmentTermEnum.java:180) >>> at org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:91) >>> at >>> org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:122) >>> at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:652) at >>> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:613) at >>> org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104) at >>> org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27) >>> at >>> org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74) >>> at >>> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:683) >>> at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69) at >>> org.apache.lucene.index.IndexReader.open(IndexReader.java:476) at >>> org.apache.lucene.index.IndexReader.open(IndexReader.java:403) at >>> org.apache.solr.core.StandardIndexReaderFactory.newReader(StandardIndexReaderFactory.java:38) >>> at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1057) at >>> org.apache.solr.core.SolrCore.<init>(SolrCore.java:579) at >>> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137) >>> at >>> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) >>> at >>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) >>> at >>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072) >>> at >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:4726) >>> at >>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) >>> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) >>> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at >>> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943) at >>> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778) at >>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504) at >>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at >>> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) >>> at >>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) >>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) ) >>> that prevented it from fulfilling this request. >>> </PRE> >>> <BR> >>> ******************************************************************************************<BR>This >>> message may contain confidential or proprietary information intended only >>> for the use of the<BR>addressee(s) named above or may contain information >>> that is legally privileged. If you are<BR>not the intended addressee, or >>> the person responsible for delivering it to the intended addressee,<BR>you >>> are hereby notified that reading, disseminating, distributing or copying >>> this message is strictly<BR>prohibited. If you have received this message >>> by mistake, please immediately notify us by<BR>replying to the message and >>> delete the original message and any copies immediately thereafter.<BR> >>> <BR> >>> Thank you.~<BR> >>> >>> ******************************************************************************************<BR> >>> FAFLD<BR> >>> <PRE> >>> >> >