On 6/8/2014 12:09 PM, rashi gandhi wrote: > I am using SolrMeter for performance benchmarking. I am able to > successfully test my solr setup up to 1000 queries per min while > searching. > But when I am exceeding this limit say 1500 search queries per min, > facing "Server Refused Connection" in SOLR. > Currently, I have only one solr server running on 64-bit 4 GB ram > machine for testing. > > Please provide me some pointers , to optimize SOLR so that it can > handle large number of request. (Specially more than 1000 request per > min). > Is there any change that I can do in solrconfig.xml or some other > change to support this?
This sounds like your servlet container is configured to limit the number of threads that can be started. I would bet that you are using a packaged Tomcat or Jetty install rather than the Jetty included in the Solr example, and that it has maxThreads set to the default value of 200. Solr tends to start a lot of threads internally simply for normal operation. If your servlet container is set to limit the number of total threads to 200 (with a default queue of 100 connections beyond the 200 threads) and you reach the limit because your connection rate is high, then new connections will be refused. The Solr example has its servlet container configured to allow ten thousand threads, so it almost never has this problem. You'll need to find the documentation for your servlet container and look there for information on how to increase maxThreads. For Tomcat 7, the Introduction in the HTTP Connector part of the documentation mentions the problem: http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Introduction You may also need to increase the amount of RAM in the server (or change the configuration to reduce heap requirements) to avoid performance problems that cause each individual query to be slow: http://wiki.apache.org/solr/SolrPerformanceProblems Thanks, Shawn