Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 169459FBDE0 for ; Tue, 6 Mar 2007 12:13:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 35902-01-4 for ; Tue, 6 Mar 2007 12:13:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.buberel.org (lenny.buberel.org [69.57.148.76]) by postgresql.org (Postfix) with ESMTP id D9CB69FBBE8 for ; Tue, 6 Mar 2007 12:12:24 -0400 (AST) Received: from [192.168.0.100] (ppp-71-139-8-247.dsl.snfc21.pacbell.net [::ffff:71.139.8.247]) (AUTH: PLAIN jason, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by mail.buberel.org with esmtp; Tue, 06 Mar 2007 10:12:23 -0600 id 0034007A.45ED92E7.00005EC5 Message-ID: <45ED92DD.3080307@buberel.org> Date: Tue, 06 Mar 2007 08:12:13 -0800 From: "Jason L. Buberel" User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Modifying the concurrent transaction limit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/50 X-Sequence-Number: 16764 I've been running into a problem with a multithreaded, long-running processing application. The problem occurs when the number of open transactions reaches the magic number of '50'. When this occurs, all further database access blocks and the application has to be restarted. I am using Hibernate with the simple JDBC Transaction Factory: org.hibernate.transaction.JDBCTransactionFactory I keep track of the number of open concurrent transactions using a static method on my hibernate session factory, and sure enough, any time I see a 'stuck' application and check the logs, I will see: 2007.03.06 09:10:05 DEBUG SessionOwnerImpl broker_zip_market_heat_quartiles subreport filler - Current trxn counter: 50 What I would like to know is: A. Is there really a built-in limit to the number of concurrent transactions? B. Can this value be configured? I have done what I can to try and ensure that these transactions are cleaned up when processing completes, but sometimes garbage collection does not occur soon enough and I accumulate 50 open transactions, wedging the process. If there is something else that I should be doing to avoid this type of problem, please suggest! Thanks, Jason PS I am using v8.1 of the driver with Postgres 8.1.x.