C#连接solr时提示 java内存异常 java.lang.OutOfMemoryError
时间:20180130 09:51:13.329,消息:异常消息<?xml version="1.0" encoding="UTF-8"?>
1 <response> 2 <lst name="responseHeader"><int name="status">400</int><int name="QTime">1</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 1 to the index; possible analysis error.</str><int name="code">400</int></lst> 3 </response> 4 ,堆栈: 在 SolrNet.Impl.SolrConnection.PostStream(String relativeUrl, String contentType, Stream content, IEnumerable`1 parameters) 5 在 SolrNet.Impl.SolrConnection.Post(String relativeUrl, String s) 6 在 SolrNet.Commands.AddCommand`1.Execute(ISolrConnection connection) 7 在 SolrNet.Impl.SolrBasicServer`1.Send(ISolrCommand cmd) 8 在 SolrNet.Impl.SolrBasicServer`1.SendAndParseHeader(ISolrCommand cmd) 9 在 SolrNet.Impl.SolrBasicServer`1.AddWithBoost(IEnumerable`1 docs, AddParameters parameters) 10 在 SolrNet.Impl.SolrServer`1.AddRange(IEnumerable`1 docs, AddParameters parameters) 11 在 SolrNet.Impl.SolrServer`1.Add(T doc, AddParameters parameters) 12 在 SolrNet.Impl.SolrServer`1.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 500 Server Error</title> </head> <body><h2>HTTP ERROR 500</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:63) at org.apache.lucene.search.HitQueue.<init>(HitQueue.java:64) at org.apache.lucene.search.TopScoreDocCollector.<init>(TopScoreDocCollector.java:184) at org.apache.lucene.search.TopScoreDocCollector$SimpleTopScoreDocCollector.<init>(TopScoreDocCollector.java:53) at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:174) at org.apache.lucene.search.TopScoreDocCollector.create(TopScoreDocCollector.java:154) at org.apache.solr.search.SolrIndexSearcher.buildTopDocsCollector(SolrIndexSearcher.java:1676) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1857) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1578) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:581) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:459) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:518) </pre> </body> </html>
很明显是jetty内部报错的错误 org.eclipse.jetty.server,那么换成tomcat会不会好一点呢??动口不如动手