本文介绍了solr - java 堆空间内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能帮我找出tomcat的错误原因.我在其中使用 solr.启动它工作正常.稍后我会提出这个错误.重新启动后它工作正常.请帮我找出错误.

Can any one help me to find out the error cause in tomcat. i m using solr in it. starting it works fine. later i will raise this error. after restarting it works fine. please help me to find out the error.

2011 年 3 月 7 日上午 10:36:47 org.apache.solr.common.SolrException 日志严重:java.lang.RuntimeException:java.lang.OutOfMemoryError:Java堆空间在org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068) 在org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:418)在org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85)在org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:169)在 org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69) 在org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)在org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)在 org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) 在org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)在org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)在org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)在org.apache.tomcat.util.net.JioEndpoint$Worker.run(JioEndpoint.java:445)在 java.lang.Thread.run(Unknown Source) 引起的:java.lang.OutOfMemoryError: Java 堆空间

推荐答案

尝试增加记忆力

设置环境变量 JAVA_OPTS="-Xms256m -Xmx500m" 这意味着堆起始大小为 256 MB,最大 512 MB.或者编辑您的 catalina.bat 或 .sh 并在那里添加这一行.

Either set the environment variable JAVA_OPTS="-Xms256m -Xmx500m" which means heap start size is 256 MB, max 512 MB. Or edit your catalina.bat or .sh and add this line there.

你必须处理这些值,几周前我有一个 SOLR 索引器工作,需要大约 2 GB 的数据和 700MB 的堆.

You have to play around with these values, some weeks ago I had an SOLR indexer job, about 2 GB of data, 700MB heap were required.

这篇关于solr - java 堆空间内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 16:56