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 Jose Aguilar <JA...@searchtechnologies.com> on 2012/01/18 23:50:48 UTC

Enforce overall Solr timeout

Hi all,

Is there a setting to enforce an overall timeout for Solr? For example, we are using setting timeallowed=2000 in solrconfig.xml (using version 3.5), but as far as I can tell, that only applies to the search part that returns partial results if it takes more than 2 seconds and returns partialResults=true, but the other processing time (facetting, highlighting, etc) is not covered in this timeallowed setting.

Is there something that can be done so that for example if a Solr call overall takes more than say 5 seconds, kill the request it and return an error, or empty response or something?

--
Jose Aguilar.

Re: Enforce overall Solr timeout

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Jose,

I'm not aware of such functionality in Solr.  But there may be something of that sort doable on the servlet container or, if you are using SolrJ to talk to Solr, you should be able to set the socket/HTTP connection timeout via the underlying HttpClient API.

Otis 
----
Performance Monitoring SaaS for Solr - http://sematext.com/spm/solr-performance-monitoring/index.html 


----- Original Message -----
> From: Jose Aguilar <JA...@searchtechnologies.com>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Cc: 
> Sent: Wednesday, January 18, 2012 5:50 PM
> Subject: Enforce overall Solr timeout
> 
> Hi all,
> 
> Is there a setting to enforce an overall timeout for Solr? For example, we are 
> using setting timeallowed=2000 in solrconfig.xml (using version 3.5), but as far 
> as I can tell, that only applies to the search part that returns partial results 
> if it takes more than 2 seconds and returns partialResults=true, but the other 
> processing time (facetting, highlighting, etc) is not covered in this 
> timeallowed setting.
> 
> Is there something that can be done so that for example if a Solr call overall 
> takes more than say 5 seconds, kill the request it and return an error, or empty 
> response or something?
> 
> --
> Jose Aguilar.
>