On 2/23/2015 7:23 AM, Moshe Recanati wrote: > Recently there were some scenarios in which queries that user sent to > solr got stuck and increased our solr heap. > > Is there any option to kill or timeout query that wasn't returned from > solr by external command? >
The best thing you can do is examine all user input and stop such queries before they execute, especially if they are the kind of query that will cause your heap to grow out of control. The "timeAllowed" parameter can abort a query that takes too long in certain phases of the query. In recent months, Solr has been modified so that timeAllowed will take effect during more query phases. It is not a perfect solution, but it can be better than nothing. http://wiki.apache.org/solr/CommonQueryParameters#timeAllowed Be aware that sometimes legitimate queries will be slow, and using timeAllowed may cause those queries to fail. Thanks, Shawn