You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bram Van Dam <br...@intix.eu> on 2013/10/07 11:37:54 UTC

[SolrJ] HttpSolrServer - maxRetries

Hi folks,

Long story short: I'm occasionally getting exceptions under heavy load 
(SocketException: Connection reset). I would expect HttpSolrServer to 
try again maxRetries-times, but it doesn't.

For reasons I don't entirely understand, the call to 
httpClient.execute(method) is not inside the retry block (and thus will 
never be retried).

Is this a bug in HttpSolrServer? Or is this intended behaviour? I'd 
rather not wrap my code in a retry mechanism if HttpSolrServer provides one.

Thx,

  - Bram

Re: [SolrJ] HttpSolrServer - maxRetries

Posted by Bram Van Dam <br...@intix.eu>.
On 10/07/2013 12:55 PM, Furkan KAMACI wrote:
> One more thing, could you say that which version of Solr you are using?

The stacktrace comes from 4.2.1, but I suspect that this could occur on 
4.4 as well. I've not been able to reproduce this consistently: it has 
happened twice (!) after indexing around 100 million documents.

Re: [SolrJ] HttpSolrServer - maxRetries

Posted by Furkan KAMACI <fu...@gmail.com>.
One more thing, could you say that which version of Solr you are using?


2013/10/7 Bram Van Dam <br...@intix.eu>

> On 10/07/2013 11:51 AM, Furkan KAMACI wrote:
>
>> Could you send you error logs?
>>
>
> Whoops, forgot to paste:
>
>
> Caused by: org.apache.solr.client.solrj.**SolrServerException:
> IOException occured when talking to server at: http://localhost:8080/solr/
> **fooIndex <http://localhost:8080/solr/fooIndex>
>         at org.apache.solr.client.solrj.**impl.HttpSolrServer.request(**HttpSolrServer.java:416)
> ~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
>         at org.apache.solr.client.solrj.**impl.HttpSolrServer.request(**HttpSolrServer.java:181)
> ~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
>         at org.apache.solr.client.solrj.**request.AbstractUpdateRequest.**
> process(AbstractUpdateRequest.**java:117) ~[solr-solrj-4.2.1.jar:4.2.1
> 1461071 - mark - 2013-03-26 08:26:57]
>         at org.apache.solr.client.solrj.**SolrServer.add(SolrServer.**java:116)
> ~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
>         at org.apache.solr.client.solrj.**SolrServer.add(SolrServer.**java:102)
> ~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
>         at org.violet.search.service.**IndexingService.addDocument(**IndexingService.java:79)
> ~[Violet-Search-1.06.003.jar:**na]
>         ... 8 common frames omitted
> Caused by: java.net.SocketException: Connection reset
>         at java.net.SocketInputStream.**read(SocketInputStream.java:**185)
> ~[na:1.6.0_24]
>         at org.apache.http.impl.io.**AbstractSessionInputBuffer.**
> fillBuffer(**AbstractSessionInputBuffer.**java:166)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.io.**SocketInputBuffer.fillBuffer(**SocketInputBuffer.java:90)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.io.**AbstractSessionInputBuffer.**
> readLine(**AbstractSessionInputBuffer.**java:281)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.conn.**DefaultHttpResponseParser.**
> parseHead(**DefaultHttpResponseParser.**java:92)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.conn.**DefaultHttpResponseParser.**
> parseHead(**DefaultHttpResponseParser.**java:62)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.io.**AbstractMessageParser.parse(**
> AbstractMessageParser.java:**254) ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.**AbstractHttpClientConnection.**
> receiveResponseHeader(**AbstractHttpClientConnection.**java:289)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.conn.**DefaultClientConnection.**
> receiveResponseHeader(**DefaultClientConnection.java:**252)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.conn.**ManagedClientConnectionImpl.**
> receiveResponseHeader(**ManagedClientConnectionImpl.**java:191)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.protocol.**HttpRequestExecutor.**
> doReceiveResponse(**HttpRequestExecutor.java:300)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.protocol.**HttpRequestExecutor.execute(**HttpRequestExecutor.java:127)
> ~[httpcore-4.2.2.jar:4.2.2]
>         at org.apache.http.impl.client.**DefaultRequestDirector.**
> tryExecute(**DefaultRequestDirector.java:**717)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.client.**DefaultRequestDirector.**execute(
> **DefaultRequestDirector.java:**522) ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.client.**AbstractHttpClient.execute(**AbstractHttpClient.java:906)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.client.**AbstractHttpClient.execute(**AbstractHttpClient.java:805)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.http.impl.client.**AbstractHttpClient.execute(**AbstractHttpClient.java:784)
> ~[httpclient-4.2.3.jar:4.2.3]
>         at org.apache.solr.client.solrj.**impl.HttpSolrServer.request(**HttpSolrServer.java:353)
> ~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
>         ... 13 common frames omitted
>
>

Re: [SolrJ] HttpSolrServer - maxRetries

Posted by Bram Van Dam <br...@intix.eu>.
On 10/07/2013 11:51 AM, Furkan KAMACI wrote:
> Could you send you error logs?

Whoops, forgot to paste:


Caused by: org.apache.solr.client.solrj.SolrServerException: IOException 
occured when talking to server at: http://localhost:8080/solr/fooIndex
         at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:416) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         at 
org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:117) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         at 
org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         at 
org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         at 
org.violet.search.service.IndexingService.addDocument(IndexingService.java:79) 
~[Violet-Search-1.06.003.jar:na]
         ... 8 common frames omitted
Caused by: java.net.SocketException: Connection reset
         at java.net.SocketInputStream.read(SocketInputStream.java:185) 
~[na:1.6.0_24]
         at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127) 
~[httpcore-4.2.2.jar:4.2.2]
         at 
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) 
~[httpclient-4.2.3.jar:4.2.3]
         at 
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:353) 
~[solr-solrj-4.2.1.jar:4.2.1 1461071 - mark - 2013-03-26 08:26:57]
         ... 13 common frames omitted


Re: [SolrJ] HttpSolrServer - maxRetries

Posted by Furkan KAMACI <fu...@gmail.com>.
Hi Bram;

Could you send you error logs?


2013/10/7 Bram Van Dam <br...@intix.eu>

> Hi folks,
>
> Long story short: I'm occasionally getting exceptions under heavy load
> (SocketException: Connection reset). I would expect HttpSolrServer to try
> again maxRetries-times, but it doesn't.
>
> For reasons I don't entirely understand, the call to
> httpClient.execute(method) is not inside the retry block (and thus will
> never be retried).
>
> Is this a bug in HttpSolrServer? Or is this intended behaviour? I'd rather
> not wrap my code in a retry mechanism if HttpSolrServer provides one.
>
> Thx,
>
>  - Bram
>