From user-return-25264-apmail-commons-user-archive=commons.apache.org@commons.apache.org Wed Nov 03 14:33:37 2010 Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 81754 invoked from network); 3 Nov 2010 14:33:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Nov 2010 14:33:36 -0000 Received: (qmail 94315 invoked by uid 500); 3 Nov 2010 14:34:07 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 94026 invoked by uid 500); 3 Nov 2010 14:34:04 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 94018 invoked by uid 99); 3 Nov 2010 14:34:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 14:34:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of phil.steitz@gmail.com designates 209.85.161.171 as permitted sender) Received: from [209.85.161.171] (HELO mail-gx0-f171.google.com) (209.85.161.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 14:33:56 +0000 Received: by gxk19 with SMTP id 19so491187gxk.30 for ; Wed, 03 Nov 2010 07:33:35 -0700 (PDT) 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=aD0Dc6F/84fiTHmhuW8JClomGNzOyP+37rgYJm+TlK4=; b=KTcKiN4z6V+J6/9XlvtlPdsSKAaDjyl4iB1u7KYeqvTvPgkuzjjN3W+5d5DQeXM9BM zY/qOH3osNzjH8WHQE+iwyq+jKO3s2+PUCm4lzGSXwYqF8KxKb8hBB6QoDIIIEggiXwM RBPOj4B1o/StXG/z8J+rEoSI4B0xwNAHO8ttQ= 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=AI9sA69Mgr9PJl0vJqB/MMU7QTUCrM9sEFpvt27gGzL3yh4ZBZg010cJqRDzC3/9mx Jr87TkRxR3twiCNat1nkkZLlY8NwvBKoj3ShBlXy6uUPlJ2YftjlQFCaoqpS5g3WoZNX es9PyBqCOUlhrvYiBXg3LRtMgFEivH6AtB9zU= Received: by 10.42.69.82 with SMTP id a18mr13749071icj.459.1288794815406; Wed, 03 Nov 2010 07:33:35 -0700 (PDT) Received: from a.local ([38.110.32.2]) by mx.google.com with ESMTPS id x26sm4509582vbw.18.2010.11.03.07.33.33 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Nov 2010 07:33:34 -0700 (PDT) Message-ID: <4CD172BC.30201@gmail.com> Date: Wed, 03 Nov 2010 10:33:32 -0400 From: Phil Steitz User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Commons Users List Subject: Re: [dbcp] Question on Active connections References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 11/3/10 10:26 AM, Meenakshisundaram, Pattabiraman wrote: > Hi, > > The DBCP configuration for my app is given below: > > > > > > > > > > > > > > I am assuming that there would be Max Active connections of 30 all the time but in the log, I see that no. of active connections appear to be cyclical. It goes down from 29 to 0 and then resets to 29. I was assuming that it would stay constant once it reaches Max Active. Is it not the way it works? > > In the log I am printing Active and Idle connections > ........ > Active-> 0 Idle-> 8 > Active-> 0 Idle-> 8 > Active-> 0 Idle-> 8 > Active-> 0 Idle-> 8 > Active-> 0 Idle-> 8 > Active-> 16 Idle-> 0 > Active-> 29 Idle-> 1 > Active-> 28 Idle-> 1 > Active-> 29 Idle-> 1 > Active-> 29 Idle-> 1 > Active-> 29 Idle-> 1 > ............. > > > Note: I am tweaking these properties with the hope that this would fix a problem we are experiencing. Would appreciate if I could get suggestions/explanation for this as well. > > Our app uses Spring Batch API to run the batch job that in turn uses DBCP. Its been running well but on very few occasions, certain threads hang. I was told to check the DB connections as it heavily uses. Oddly, it fails even on a simple step that takes only one DB connection. I was using DBCP 1.2.2 (build yr 2006) and recently upgraded to the latest 1.4. > > Set maxIdle = 30. The default setting for this parameter is 8, so if you don't specify it, the idle instance count is limited to 8. Phil > > > Thanks > Pattabi > > Ignorance more frequently begets confidence than does knowledge - Charles Darwin > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org