4
votes

In solr 3.6.1, At some point am getting the following error when concurrent request(concurrent load test) performed against the solr server.

org.apache.solr.common.SolrException log
SEVERE: org.mortbay.jetty.EofException
Caused by: java.net.SocketException: Broken pipe

and

Committed before 500 null||org.mortbay.jetty.EofException|?at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:791)|?at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:569)|?at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:1012)|?at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:278)|?at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)|?at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)|?at org.apache.solr.common.util.FastWriter.flush(FastWriter.java:115)|?at org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:353)|?at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:273)|?at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)|?at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)|?at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)|?at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)|?at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)|?at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)|?at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)|?at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)|?at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)|?at org.mortbay.jetty.Server.handle(Server.java:326)|?at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)|?at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)|?at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)|?at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)|?at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)|?at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)|?at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)|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.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:368)|?at org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:129)|?at org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:161)|?at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:714)|?... 25 more

Kindly suggest any idea to resolve this error from solr ?

1
This can also be caused by a broken TCP pipe due to client-side (not jetty). It happens when the client closes TCP connection and solr tries to send a response.Vincent

1 Answers

7
votes

I don't think it's your solr, the broken pipe happens (happened to me, at least) because of a timeout problem with the client.

Check for your curl timeout value and try to set explicitly a keep-alive Tomcat so you can avoid this situation again.

quick update (just to give a hint, configuration may vary)

in your jetty folder, you should look for a folder named WEB-INF that should contain a file named jetty-web.xml (or web-jetty.xml)

adding these lines:

<session-config>
    <session-timeout>720</session-timeout>
</session-config>

should help you (change 720 in what you like more)

there's also the option

<Set name="maxIdleTime">300000</Set>

that may do your trick. You'll have to dig into jetty's doc a lot to figure out this for your case

more about this: here and here