C#连接solr时提示 java内存异常 java.lang.OutOfMemoryError
时间:20180130 09:51:13.329,消息:异常消息<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status"></int><int name="QTime"></int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">java.lang.OutOfMemoryError</str></lst><str name="msg">Exception writing document id to the index; possible analysis error.</str><int name="code"></int></lst>
</response>
,堆栈: 在 SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable` parameters)
在 SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s)
在 SolrNet.Commands.AddCommand`.Execute(ISolrConnection connection)
在 SolrNet.Impl.SolrBasicServer`.Send(ISolrCommand cmd)
在 SolrNet.Impl.SolrBasicServer`.SendAndParseHeader(ISolrCommand cmd)
在 SolrNet.Impl.SolrBasicServer`.AddWithBoost(IEnumerable` docs, AddParameters parameters)
在 SolrNet.Impl.SolrServer`.AddRange(IEnumerable` docs, AddParameters parameters)
在 SolrNet.Impl.SolrServer`.Add(T doc, AddParameters parameters)
在 SolrNet.Impl.SolrServer`.Add(T doc)
写入数据写着写着就提示java内存异常,怎么玩?
直接通过solr start和solr stop -all 启动和停止服务的,没有部署到tomcat上
另外尝试过
其他作者的相关工具 ,暂时无效果 http://blog.csdn.net/lirenzuo/article/details/54848255
提示找不到进程,不知道怎么回事。
浏览器是可以访问的,老铁们有没有遇到类似的情况,csdn的作者没有联系上,释放内存无效果,怎么解决。java一直提示内存异常,没法写入数据,重启服务无效果,重启电脑有时候可以继续写入,如果一直重启电脑的话那就坑了。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error Server Error</title>
</head>
<body><h2>HTTP ERROR </h2>
<p>Problem accessing /solr/Article/select. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryError: Java heap space
at org.apache.lucene.util.PriorityQueue.<init>(PriorityQueue.java:)
at org.apache.lucene.search.HitQueue.<init>(HitQueue.java:)
at org.apache.lucene.search.TopScoreDocCollector.<init>(TopScoreDocCollector.java:)
at org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector.<init>(TopScoreDocCollector.java:)
at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:)
at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:)
at org.apache.solr.search.SolrIndexSearcher.buildTopDocsCollector(SolrIndexSearcher.java:)
at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:)
at org.eclipse.jetty.server.Server.handle(Server.java:)
</pre> </body>
</html>
很明显是jetty内部报错的错误 org.eclipse.jetty.server,那么换成tomcat会不会好一点呢??动口不如动手