Solr崩溃并出现SocketException Broken pipe错误

4

我正在使用Solr 3.1和tomcat6。当并发写入和读取的数量增加时,它会崩溃并抛出SocketException错误。我通过多个客户端进行并发提交和搜索。非常感谢您的任何帮助。以下是tomcat日志:

Dec 11, 2011 8:02:43 AM org.apache.solr.common.SolrException log
SEVERE: ClientAbortException:  java.net.SocketException: Broken pipe
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:325)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
        at org.apache.solr.common.util.FastWriter.write(FastWriter.java:55)
        at org.apache.solr.response.JSONWriter.writeStr(JSONResponseWriter.java:622)
        at org.apache.solr.schema.StrField.write(StrField.java:54)
        at org.apache.solr.schema.SchemaField.write(SchemaField.java:130)
        at org.apache.solr.response.JSONWriter.writeDoc(JSONResponseWriter.java:385)
        at org.apache.solr.response.JSONWriter.writeDoc(JSONResponseWriter.java:453)
        at org.apache.solr.response.JSONWriter.writeDocList(JSONResponseWriter.java:501)
        at org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:129)
        at org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:180)
        at org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:296)
        at org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:93)
        at org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:52)
        at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:343)
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:265)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:741)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:765)
        at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:127)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:574)
        at org.apache.coyote.Response.doWrite(Response.java:560)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
        ... 34 more

1
你为什么要进行并发提交(我假设是到同一个核心)? - Mauricio Scheffer
1
此外,异常信息显示客户端已断开连接(参见https://dev59.com/JHRA5IYBdhLWcg3wwwzD),因此这似乎是客户端问题,而不是服务器(Solr/tomcat)问题...或者是网络问题。 - Mauricio Scheffer
2个回答

1

0
我发现每当我的应用程序在等待solr时超时,我会在solr日志中看到这个异常。对我来说,solr处理查询的时间超过了10秒,而等待它的应用程序已经超时了。
希望这可以帮助到您。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接