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 adfel70 <ad...@gmail.com> on 2016/01/21 16:16:48 UTC

Read time out exception - exactly 10 minutes after starting committing

I am running soft commit on 100 solr docs (the index itself has 3 Billion
docs).
After EXACTLY 10 minutes (for example, start committing on 15:52:55.932,
exception on 16:02:55.976) I am getting several exception of the sort:
org.apache.solr.client.solrj.SolrServerException: Timeout occured while
waiting response from server at: [any instance of solr] ...
Caused by: java.net.SocketTimeoutException: Read timed out

All the exceptions are from the same instance to other instances in the
cluster.

I have checked the jetty.xml, the java params and the solr config -  and
didn't find any place where a timeout of 10 minutes is configured.
I have tunned the filterCache, queryResultCache and documentCahce to:
size="2048", initialSize="1024", autowarmCount="1024"
I created queries for newSearcher for warm-up

I have 2 questions:
1. Can someone point me to the rigth direction for the timeout?
2. Why could the commit take so long?!

Thanks,



--
View this message in context: http://lucene.472066.n3.nabble.com/Read-time-out-exception-exactly-10-minutes-after-starting-committing-tp4252287.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Read time out exception - exactly 10 minutes after starting committing

Posted by David Andrews <da...@gmail.com>.
I just got bit by this today.  I tracked it down to the default solr.xml file in ./server/solr/solr.xml with the following:
  <shardHandlerFactory name="shardHandlerFactory"
    class="HttpShardHandlerFactory">
    <int name="socketTimeout">${socketTimeout:600000}</int>
    <int name="connTimeout">${connTimeout:60000}</int>
  </shardHandlerFactory>

I’m on Solr 5.3.1 now, and I wasn’t having this problem with 4.10.3, and sure enough, 4.10.3 has the values at 0 (i.e. no socket timeout)

-David

> On Jan 24, 2016, at 3:18 PM, Shawn Heisey <ap...@elyograg.org> wrote:
> 
> On 1/23/2016 9:24 PM, adfel70 wrote:
>> 1. I am getting the "read time out" from the Solr Server.
>> Not from my client, but from the server client when it tries to reach other
>> instances while committing.
>> 
>> 2. I reduced the filter cache autowarmCount to 512, and seems to fix the
>> problem. It now takes only several seconds to commit!
> 
> Do you have any configuration for ShardHandler in your solrconfig.xml?
> 
> https://wiki.apache.org/solr/SolrConfigXml#Configuration_of_Shard_Handlers_for_Distributed_searches
> 
> This is where the client built into Solr can be configured with a socket
> timeout.
> 
> Regarding your cache configuration, even an autowarmCount of 512 is
> quite high.  I have configured a value of *four* for my filterCache,
> because anything higher resulted in unacceptable commit times.  You may
> need to experiment with your configuration for best results.
> 
> Thanks,
> Shawn
> 


Re: Read time out exception - exactly 10 minutes after starting committing

Posted by adfel70 <ad...@gmail.com>.
I don't have any custom ShardHandler

Regarding the cache, I reduced it to zero, and checking performance now

Thanks,



--
View this message in context: http://lucene.472066.n3.nabble.com/Read-time-out-exception-exactly-10-minutes-after-starting-committing-tp4252287p4253568.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Read time out exception - exactly 10 minutes after starting committing

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/23/2016 9:24 PM, adfel70 wrote:
> 1. I am getting the "read time out" from the Solr Server.
> Not from my client, but from the server client when it tries to reach other
> instances while committing.
>
> 2. I reduced the filter cache autowarmCount to 512, and seems to fix the
> problem. It now takes only several seconds to commit!

Do you have any configuration for ShardHandler in your solrconfig.xml?

https://wiki.apache.org/solr/SolrConfigXml#Configuration_of_Shard_Handlers_for_Distributed_searches

This is where the client built into Solr can be configured with a socket
timeout.

Regarding your cache configuration, even an autowarmCount of 512 is
quite high.  I have configured a value of *four* for my filterCache,
because anything higher resulted in unacceptable commit times.  You may
need to experiment with your configuration for best results.

Thanks,
Shawn


Re: Read time out exception - exactly 10 minutes after starting committing

Posted by adfel70 <ad...@gmail.com>.
Thanks Shawn,

1. I am getting the "read time out" from the Solr Server.
Not from my client, but from the server client when it tries to reach other
instances while committing.

2. I reduced the filter cache autowarmCount to 512, and seems to fix the
problem. It now takes only several seconds to commit!

Thanks a lot,



--
View this message in context: http://lucene.472066.n3.nabble.com/Read-time-out-exception-exactly-10-minutes-after-starting-committing-tp4252287p4252855.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Read time out exception - exactly 10 minutes after starting committing

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/21/2016 8:16 AM, adfel70 wrote:
> I am running soft commit on 100 solr docs (the index itself has 3 Billion
> docs).
> After EXACTLY 10 minutes (for example, start committing on 15:52:55.932,
> exception on 16:02:55.976) I am getting several exception of the sort:
> org.apache.solr.client.solrj.SolrServerException: Timeout occured while
> waiting response from server at: [any instance of solr] ...
> Caused by: java.net.SocketTimeoutException: Read timed out
>
> All the exceptions are from the same instance to other instances in the
> cluster.
>
> I have checked the jetty.xml, the java params and the solr config -  and
> didn't find any place where a timeout of 10 minutes is configured.
> I have tunned the filterCache, queryResultCache and documentCahce to:
> size="2048", initialSize="1024", autowarmCount="1024"
> I created queries for newSearcher for warm-up
>
> I have 2 questions:
> 1. Can someone point me to the rigth direction for the timeout?
> 2. Why could the commit take so long?!

1) The client has been configured with a ten minute socket timeout on
TCP connections.  This is usually not something that happens by default
-- it usually must be configured by somebody.  Is this exception
happening in your client code, or in the Solr server log?

2) Commits on very large indexes, like what is usually found when the
whole index is 3 billion docs, tend to be slow.  This could be caused by
not having enough memory to effectively cache the index, but more
commonly it is caused by large autowarmCount values on large Solr
caches, and I believe that is what is happening here.

If we assume that your filterCache actually does reach a size of 1024,
then the configuration that you have indicated says that every time you
commit, Solr will execute the most recent 1024 filter queries in the
cache, to warm the new cache.  If each filter query takes half a second
to execute on a brand new index, then 1024 of them will take eight and a
half minutes.  Very likely the filters in your cache are taking longer
than half a second to execute.

Thanks,
Shawn