Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 89600 invoked from network); 4 May 2007 22:40:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 May 2007 22:40:39 -0000 Received: (qmail 27439 invoked by uid 500); 4 May 2007 22:40:45 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 27418 invoked by uid 500); 4 May 2007 22:40:44 -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 27407 invoked by uid 99); 4 May 2007 22:40:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 15:40:44 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of eakinto@buscape-inc.com designates 200.225.81.133 as permitted sender) Received: from [200.225.81.133] (HELO smtp-02.mandic.com.br) (200.225.81.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 15:40:36 -0700 Received: (qmail 18966 invoked from network); 4 May 2007 22:40:13 -0000 Received: from unknown (HELO Tecnologia04) (z8XUzNXI06fJ5tO0x96XYJqOlF6Wp6I=@[200.143.19.126]) (envelope-sender ) by smtp-02.mandic.com.br (qmail-ldap-1.03) with SMTP for ; 4 May 2007 22:40:13 -0000 Message-ID: <3eee01c78e9d$26427e10$c615a8c0@Tecnologia04> From: "Eduardo Kinto" To: "Apache Torque Users List" References: <389901c78caa$4a3b7cd0$c615a8c0@Tecnologia04> <4638DD0F.3060402@manskes.de> Subject: Re: Could not retrieve connection info from pool Date: Fri, 4 May 2007 19:40:00 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-15"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Checked: Checked by ClamAV on apache.org Hi Michael, I will update the lib and see if it solve my problem. Thank you, Eduardo. ----- Original Message ----- From: "Michael Manske" To: "Apache Torque Users List" Sent: Wednesday, May 02, 2007 3:48 PM Subject: Re: Could not retrieve connection info from pool > Hi Eduardo, > > we were facing similiar issues with a "heavy-load-application" and torque > 3.2. The application uses four connection pools and many connections with > a lot of concurrent transactions. The stack trace of the exception was the > same as yours. Other torque based applications developed by us were > running fine without running out of connections. > After many days of profiling, debugging and optimizing we tracked down > the issues to commons-dbcp, especially to > http://issues.apache.org/jira/browse/DBCP-100. > > After updating commons-dbcp from 1.2.1 to 1.2.2 the problems are gone. > > Please note: Even if updating commons-dbcp was the solution in our special > case, running out of connections is mostly caused due to programming > errors... > > cheers > Michael > > Eduardo Kinto schrieb: >> Hello, >> >> I'm using Torque to connect to my MSSql and MySQL Server database. >> >> Everything is working fine, just one problem, some times Database >> connection >> fail and don't come back (both, mysql and mssql) by it self and I have to >> restart my webserver >> (where it is running my application). >> >> Running the command netstat, I can't see any connnection to database >> server. >> >> I'm using: >> - torque-3.2.jar >> - apache tomcat 5.5.12 >> - java jdk 1.5.0_06 >> - RedHat Linux Enterprise 4 >> >> And the folowing torque setup for mysql: >> >> torque.dsfactory.APP.factory = >> org.apache.torque.dsfactory.SharedPoolDataSourceFactory >> torque.dsfactory.APP.connection.driver = com.mysql.jdbc.Driver >> torque.dsfactory.APP.connection.url = >> jdbc:mysql://IP:PORT/APP?autoReconnect=true >> torque.dsfactory.APP.connection.user = yyy >> torque.dsfactory.APP.connection.password = xxx >> torque.dsfactory.APP.pool.defaultTransactionIsolation=1 >> torque.dsfactory.APP.pool.maxWait=600000 >> torque.dsfactory.APP.pool.maxActive=32 >> torque.dsfactory.APP.pool.maxIdle=32 >> torque.dsfactory.APP.pool.testOnBorrow=true >> torque.dsfactory.APP.pool.validationQuery=SELECT 1 >> >> And for MSSqlServer: >> torque.dsfactory.APP2.factory = >> org.apache.torque.dsfactory.SharedPoolDataSourceFactory >> torque.dsfactory.APP2.connection.driver = >> net.sourceforge.jtds.jdbc.Driver >> torque.dsfactory.APP2.connection.url = >> jdbc:jtds:sqlserver://IP:1433/DATABASE >> .. similary to mysql ... >> >> The ERROR message: >> org.apache.torque.TorqueException: >> org.apache.commons.dbcp.SQLNestedException: Could not retrieve connection >> info from pool >> at >> org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:825) >> at org.apache.torque.Torque.getConnection(Torque.java:272) >> at org.apache.torque.util.BasePeer.doPSSelect(BasePeer.java:1478) >> ... Caused by: org.apache.commons.dbcp.SQLNestedException: Could not >> retrieve connection info from pool >> at >> org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:169) >> at >> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:631) >> at >> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:615) >> at >> org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:821) >> ... 11 more >> Caused by: java.lang.NullPointerException >> at >> org.apache.commons.collections.SequencedHashMap.removeEntry(SequencedHashMap.java:215) >> at >> org.apache.commons.collections.SequencedHashMap.removeImpl(SequencedHashMap.java:473) >> at >> org.apache.commons.collections.SequencedHashMap.remove(SequencedHashMap.java:460) >> at org.apache.commons.collections.LRUMap.get(LRUMap.java:93) >> at >> org.apache.commons.dbcp.datasources.SharedPoolDataSource.getUserPassKey(SharedPoolDataSource.java:176) >> at >> org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:165) >> ... 14 more >> >> >> >> Restarting my webserver everything is working fine again. Can't torque >> re-establish a valid connection to the database by >> it self ? >> >> I have an heavy activity on my MSSql database, sometime I get the >> following error message: >> Caused by: java.sql.SQLException: I/O Error: Connection reset >> at net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:797) >> at >> net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:332) >> at >> net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:723) >> at >> net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:652) >> at >> org.apache.torque.util.BasePeer.executeStatement(BasePeer.java:1294) >> ... 6 more >> >> Does the error "Connection reset" is telling me I'm losting one >> connection from the pool and after losing all >> connection I get "Could not retrieve connection info from pool" ? If so, >> do I have to create a new connection and >> set it on the pool ? >> >> >> Thank you, >> >> Eduardo. >> >> >> >> >> ------------------------------------------------------------------------ >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: >> 269.6.2/785 - Release Date: 02.05.2007 14:16 > > --------------------------------------------------------------------- > 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