Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@locus.apache.org Received: (qmail 12599 invoked from network); 18 Dec 2007 14:54:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Dec 2007 14:54:25 -0000 Received: (qmail 41162 invoked by uid 500); 18 Dec 2007 14:54:13 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 41140 invoked by uid 500); 18 Dec 2007 14:54:13 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 41131 invoked by uid 99); 18 Dec 2007 14:54:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 06:54:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryantxu@gmail.com designates 64.233.170.186 as permitted sender) Received: from [64.233.170.186] (HELO rn-out-0102.google.com) (64.233.170.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2007 14:53:51 +0000 Received: by rn-out-0102.google.com with SMTP id v46so359257rnb.14 for ; Tue, 18 Dec 2007 06:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=9D4w64YkqtueXSY/DQux9t8zFNFXpuvO23Q4swDKUiE=; b=X6XS8CWKVucqpBHuS70FGjXcqAOYyS+tAWABzNzqGzx4mVH+6QVgx2CzVZnMSKjcgcewbQWT6D8Lh4iZGEwed3/n7SyLgDtSRtYP5M91cAwoXZojPWzDzixbdklmoA3Yeklq0aBqNmgQPrxvVgv8BS7nZY0qXEM8n30rnc+y3SA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ZtWziJLBsXKKxBlKyh0n8wxhRH+sA11quP4F8zTfwX3wNrM9j5pDflrhEjF8FgmubbiCIWpGgHwtWG+gbZ3AdfaVmzqYbpgT6kl9Xl1+5kndX0Tp43Rj4DidAC5tKZTs7mQMHSWabQ28ZsCjgGxX9TtO9QNlBSTtJiZcZCQdQ00= Received: by 10.142.113.17 with SMTP id l17mr2201307wfc.188.1197989629350; Tue, 18 Dec 2007 06:53:49 -0800 (PST) Received: from ?192.168.1.4? ( [66.92.161.165]) by mx.google.com with ESMTPS id h14sm6645765wxd.2007.12.18.06.53.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 Dec 2007 06:53:48 -0800 (PST) Message-ID: <4767DE19.5050202@gmail.com> Date: Tue, 18 Dec 2007 09:50:01 -0500 From: Ryan McKinley User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: solr-dev@lucene.apache.org Subject: Re: Resource contention problem in Solrj References: <3e7716cd0712171800y6366c5dcvab51d3eb9776abb4@mail.gmail.com> In-Reply-To: <3e7716cd0712171800y6366c5dcvab51d3eb9776abb4@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org climbingrose wrote: > There seems to be resource contention problem with Solrj under load. To > reproduce the problem: set up a sample webapp with solrj connect to a HTTP > Solr instance and hammer the webapp with Apache ab (say 10 concurrent > connection with 100 requests). You'll notice that the webapp's servlet > container quickly consumes 100% CPU and stays there unless you restart it. I > can confirm that this happens with both Tomcat and Jetty. Meanwhile, the > server that Solr is deployed on seems to be running fine. > >>>From this observation, I suspect that Solrj has connection contention > problem. And this seems to be the case if you look at CommonHttpSolrServer. > This class uses MultiThreadedHttpConnectionManager which has > maxConnectionsPerHost set to 2 by default. When the number of thread > increases, this is obviously not enough and leads to connection contention I'm reluctant to add a constructor to the API since all the params can be set via getConnectionManager() perhaps we should increase the default maxConnectionsPerHost. 10? We should also add some comment about setting it? > > Hope this information would help others. > yes, thanks! ryan