Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 86530 invoked from network); 26 Jan 2011 01:05:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jan 2011 01:05:50 -0000 Received: (qmail 28870 invoked by uid 500); 26 Jan 2011 01:05:49 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 28552 invoked by uid 500); 26 Jan 2011 01:05:48 -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 28471 invoked by uid 99); 26 Jan 2011 01:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 01:05:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of phil.steitz@gmail.com designates 209.85.214.43 as permitted sender) Received: from [209.85.214.43] (HELO mail-bw0-f43.google.com) (209.85.214.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jan 2011 01:05:41 +0000 Received: by bwz14 with SMTP id 14so928640bwz.30 for ; Tue, 25 Jan 2011 17:05:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=XL5Hr7FY1SLyITFZn9DbVoGkclhjX+UiJ5S4vi3umKo=; b=kSuZGoOgzTdmpLByOKZ5EJQUVmuTNx4yqNwd8UZP4VyQJ/tHSy8t49dD3sfksRkd5f UaEmKfCgF0VCrcJ6hqpNdjdvbwtZEjRo8JEW7uqOHheuuWPuru8NBEAEuXsH36YSwfdI QxikZGoIkxRLvDzGJU0AIkCNNBI0C+CMxCLk8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gJEq8aVOQLy47rxuiGiL2SmcUUYdXpM27pkoWT9KAPGVOubNpi7r7FR1bwCOyn4ElA D8mxFQp61jgZARsb5hhR4ucD4p3kC2ebhdetGgRreHFxvEdi81+q2q4t0FdeuMqXHDnP hHklpibojtZ5y0DTgDtTf9C1Ww8UtxVG8SRak= MIME-Version: 1.0 Received: by 10.204.24.9 with SMTP id t9mr5895437bkb.183.1296003919984; Tue, 25 Jan 2011 17:05:19 -0800 (PST) Received: by 10.204.48.141 with HTTP; Tue, 25 Jan 2011 17:05:19 -0800 (PST) In-Reply-To: References: Date: Tue, 25 Jan 2011 20:05:19 -0500 Message-ID: Subject: Re: [DBCP] Too many connections issue... From: Phil Steitz To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jan 25, 2011 at 4:39 PM, Suny kk wrote: > Hi Phil, > > Yes, I'm using BasiDataSource well, Is it because of my DBCP settings? > Remember I got this exception when I started my application on different > machine with same database. > Well, if the first instance starts and uses the full 500 max connections, then that could explain why the second instance cannot get any connections from the database (assuming the database itself cannot handle more than 500 connections). As I said below, the error that you are getting means that when the application starts the database does not have connections available to provide to the pool. You should check and confirm: 0) Is the application closing all connections that it opens? You can quickly max the pool connections if your code does not return connections to the pool. Your configuration allows 500 connections to be opened by the pool concurrently. You should observe the actual database engine connection counts and see if your app is getting near the max. Given that you have maxIdle set at 8, if you are hitting high connection count numbers either you have some very long-running queries and large load spikes, or your code is abandoning connections (not closing them). 1) Are other applications or processes consuming available database connections? Phil --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org