0

Apparently either Solr or its bundled Jetty has some kind of request timeout. When I issue a query that takes a bit of time, Solr always returns "socket hang up" error the first time. If I re-issue the very same query the next time, the correct results would return quickly. For the life of me, I can't figure out where to control this timeout. Specifying "timeAllowed" as part of the query doesn't help. I am using Solr v6.3.0. Any pointer is appreciated.

Thien Pham
  • 157
  • 1
  • 1
  • 4

1 Answers1

0

I am assuming your client and your Solr are on different machines.

If so, I would actually look at whether you have firewall between your client and your Solr first. They have the timeouts and if no-traffic happens over them, cut the connection in the middle.

You can verify this with tools like Wireshark or by issuing your query with curl from the same machine as Solr.

Alexandre Rafalovitch
  • 9,709
  • 1
  • 24
  • 27
  • Thank you, but that's not the case. Both servers are running locally on the same machine. The same problem occurs with the same query from Solr admin page. Reissue the query right after it fails will come back quickly with the correct results. – Thien Pham Feb 22 '17 at 17:49
  • Then perhaps your documents (stored fields) are so big that their recreation from the disk takes too long. The query continues after the socket timeout and the next time you are hitting either a document or a query cache. – Alexandre Rafalovitch Feb 22 '17 at 18:10
  • I believe that is the case. The query does several joins so it does take a bit of time, probably around 10 secs. However, my question is - can I control the socket timeout limit on the Solr/Jetty side through some configuration setting? – Thien Pham Feb 22 '17 at 18:30
  • Solr 6.3 uses Jetty 9.3.8, so I would start from there: http://www.eclipse.org/jetty/documentation/9.3.x/configuring-connectors.html#jetty-connectors-network-settings idleTimeout looks like a relevant setting to try. – Alexandre Rafalovitch Feb 22 '17 at 20:06
  • That was the first thing I tried. I did try various configuration params such as idleTimeout, soLingerTime, stopTimeout, maxIdleTimeout, socketTimeout after exhaust searches on the web but to no avail. I also even tried set 60000 on Solr's requestHandler (in solrconfig.xml). Nothing seems to have any effect unfortunately. – Thien Pham Feb 22 '17 at 21:05