Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 88082 invoked from network); 21 Apr 2008 14:01:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Apr 2008 14:01:08 -0000 Received: (qmail 14750 invoked by uid 500); 21 Apr 2008 14:01:09 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 14736 invoked by uid 500); 21 Apr 2008 14:01:08 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 14725 invoked by uid 99); 21 Apr 2008 14:01:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 07:01:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of helgew@grajagan.org designates 66.159.194.18 as permitted sender) Received: from [66.159.194.18] (HELO mail.grajagan.org) (66.159.194.18) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 14:00:16 +0000 Received: from bigmac.activx.com (activx.com [12.184.141.98]) (authenticated bits=0) by mail.grajagan.org (8.14.1/8.14.1) with ESMTP id m3LE0X2o031883 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 21 Apr 2008 07:00:34 -0700 Message-Id: <4C6A29C9-9A92-4BBB-B937-E874C61F1EFB@grajagan.org> From: Helge Weissig To: "Apache Torque Users List" In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: oracle connection pool issue Date: Mon, 21 Apr 2008 07:00:27 -0700 References: X-Mailer: Apple Mail (2.919.2) X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0 (mail.grajagan.org [66.159.194.80]); Mon, 21 Apr 2008 07:00:35 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org Thanks Thomas! It turned out that there were a couple of other hidden connections being made in the loop and making those also use the one connection did the trick. That said, I am wondering why the connection pool is not replenished or at least not fast enough so. Is there a setting that would change that? thanks, h. On Thu, Apr 17, 2008, at 12:49AM, Thomas Fischer wrote: >> From your description, I do not know where the problem is. You >> might want > to try the following: > - Check that you are using a current dbcp version (1.2.2) > - Try to debug into the save() code and check where Torque opens a new > connection. The Data source used in SharedPoolDataSourceFactory, > org.apache.commons.dbcp.datasources.SharedPoolDataSource, has a method > getNumActive(), so it should store the number of active connections > somewhere (You need a debugger for this, Torque does not expose the > Data > Source). Also check that getNumActive() decreases after the > connection is > closed. With this information. I might be able to help you further. > > Thomas > > Helge Weissig schrieb am 17.04.2008 01:30:48: > >> Hi all, >> >> the following configuration and pseudo code cause my web >> application >> to hang if the value of numObjects is larger than the value of >> torque.dsfactory.oracle.pool.maxActive >> >> Torque.properties: >> >> torque.database.oracle.adapter=oracle >> torque >> .dsfactory >> .oracle >> .factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory >> torque >> .dsfactory.oracle.connection.driver=oracle.jdbc.driver.OracleDriver >> torque.dsfactory.oracle.pool.maxActive=40 >> >> java pseudo code: >> >> for (int n = 0; n < numObjects; n++) { >> TestTable o = new TestTable(); >> o.setRowValue(n); >> o.save(); >> } >> >> I have (without success) tried several other ways, including the re- >> use of one single connection: >> >> Connection con = Torque.getConnection("oracle"); >> for (int n = 0; n < numObjects; n++) { >> TestTable o = new TestTable(); >> o.setRowValue(n); >> TestTablePeer.doInsert(o, con); >> } >> con.close(); >> >> Any idea what would allow me to not have to use some ridiculously >> high >> value for the number of maximum active connections in the connection >> pool? >> >> I am using Torque 3.3 and Oracle 8i (OK, yes, that may be a problem, >> but I would still love to hear the *reason*). The table in question >> uses a native ID method via a simple sequence. >> >> thanks so much! >> h. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org >> For additional commands, e-mail: torque-user-help@db.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org