Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 37267 invoked from network); 2 May 2007 12:19:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2007 12:19:45 -0000 Received: (qmail 32893 invoked by uid 500); 2 May 2007 12:19:48 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 32881 invoked by uid 500); 2 May 2007 12:19:48 -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 32855 invoked by uid 99); 2 May 2007 12:19:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 05:19:48 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [62.109.82.234] (HELO mail.cadooz.de) (62.109.82.234) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 May 2007 05:19:40 -0700 Received: from [192.168.107.5] (helo=securemail.cadooz-ag.intern) by gateway.cadooz-ag.intern with esmtp (Exim 4.43) id 1HjDnj-0001ox-5R for torque-user@db.apache.org; Wed, 02 May 2007 14:19:19 +0200 Received: from securemail (localhost [127.0.0.1]) by securemail.cadooz-ag.intern (Postfix) with ESMTP id 261D26BC058 for ; Wed, 2 May 2007 14:19:19 +0200 (CEST) Received: from srv-master.cadooz-ag.intern (srv-master.cadooz-ag.intern [192.168.107.3]) by securemail.cadooz-ag.intern (Postfix) with ESMTP id 16C256BC057 for ; Wed, 2 May 2007 14:19:19 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: Could not retrieve connection info from pool Date: Wed, 2 May 2007 14:19:18 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Could not retrieve connection info from pool thread-index: AceMsbwxzli8YVa3SRCLphGafAeAkgAAB1Ng From: "Thoralf Rickert" To: "Apache Torque Users List" X-TBoneOriginalFrom: "Thoralf Rickert" X-TBoneOriginalTo: "Apache Torque Users List" X-TBoneDomainSigned: false X-Virus-Checked: Checked by ClamAV on apache.org > But if so, shoudn't I see openned connection (socket) to the=20 > database server=20 > ? Hmm, I'm not sure how the commons-pool is using the connection. In my = opinion: yes there should be a lot of open connections. But I'm not sure = about this. You can test this by increasing the number of max allowed = connections and verify if they are all used frequently (I know that you = can get some statistics informations in MySQL with "SHOW xyz..."). > I do have many transactions. It is an "heavy" application.=20 > Sometimes work=20 > fine for > one or two days and then "crash" (stop working), both Mysql=20 > and MSSQL,=20 > almost > simultaneously. >=20 > The Mysql server has much less connection (transaction) than=20 > MSSql, but when=20 > I got the > "Could not retrieve connection info from pool" both of them=20 > stop working. That's strange. I thought that the pools are independent. But your = explanation says my that they aren't. Maybe you're right and there are = some network problems too. > Not all "Could not retrieve connection info from pool" stops=20 > my application,=20 > sometimes > it continue to run just after a get that message. >=20 > My guess it some network problem occurred and the container=20 > could not handle "re-open" of the connections. Even though=20 > I've set the "validationQuery". >=20 > Thank you. >=20 > Eduardo. >=20 > ----- Original Message -----=20 > From: "Thoralf Rickert" > To: "Apache Torque Users List" > Sent: Wednesday, May 02, 2007 8:22 AM > Subject: AW: Could not retrieve connection info from pool >=20 >=20 > Hi! >=20 > Is it possible, that your application uses many transactions?=20 > If you forget=20 > to close this connections - the pool is running out of=20 > connections from time=20 > to time. Maybe there is just one unclosed transaction=20 > somewhere in your=20 > application. If you have a lot of traffic on your site you=20 > can increase the=20 > number of max connections...but I'm sure there is missing commit() or=20 > safeRollback(). >=20 > bye > Thoralf >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Eduardo Kinto [mailto:eakinto@buscape-inc.com] > > Gesendet: Mittwoch, 2. Mai 2007 13:09 > > An: torque-user@db.apache.org > > Betreff: Could not retrieve connection info from pool > > > > > > Hello, > > > > I'm using Torque to connect to my MSSql and MySQL Server database. > > > > Everything is working fine, just one problem, some times Database=20 > > connection fail and don't come back (both, mysql and > > mssql) by it self and I have to restart my webserver (where it is=20 > > running my application). > > > > Running the command netstat, I can't see any connnection to=20 > database=20 > > 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 =3D=20 > > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > > torque.dsfactory.APP.connection.driver =3D com.mysql.jdbc.Driver=20 > > torque.dsfactory.APP.connection.url =3D=20 > > jdbc:mysql://IP:PORT/APP?autoReconnect=3Dtrue > > torque.dsfactory.APP.connection.user =3D yyy=20 > > torque.dsfactory.APP.connection.password =3D xxx=20 > > torque.dsfactory.APP.pool.defaultTransactionIsolation=3D1 > > torque.dsfactory.APP.pool.maxWait=3D600000 > > torque.dsfactory.APP.pool.maxActive=3D32 > > torque.dsfactory.APP.pool.maxIdle=3D32 > > torque.dsfactory.APP.pool.testOnBorrow=3Dtrue > > torque.dsfactory.APP.pool.validationQuery=3DSELECT 1 > > > > And for MSSqlServer: > > torque.dsfactory.APP2.factory =3D=20 > > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > > torque.dsfactory.APP2.connection.driver =3D=20 > > net.sourceforge.jtds.jdbc.Driver=20 > torque.dsfactory.APP2.connection.url=20 > > =3D jdbc:jtds:sqlserver://IP:1433/DATABASE > > .. similary to mysql ... > > > > The ERROR message: > > org.apache.torque.TorqueException: > > org.apache.commons.dbcp.SQLNestedException: Could not retrieve=20 > > connection info from pool > > at=20 > > 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=20 > > retrieve connection info from pool > > at=20 > > org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPo > > oledConnectionAndInfo(SharedPoolDataSource.java:169) > > at=20 > > org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getC > > onnection(InstanceKeyDataSource.java:631) > > at=20 > > org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getC > > onnection(InstanceKeyDataSource.java:615) > > at=20 > > org.apache.torque.TorqueInstance.getConnection(TorqueInstance. > > java:821) > > ... 11 more > > Caused by: java.lang.NullPointerException > > at=20 > > org.apache.commons.collections.SequencedHashMap.removeEntry(Se > > quencedHashMap.java:215) > > at=20 > > org.apache.commons.collections.SequencedHashMap.removeImpl(Seq > > uencedHashMap.java:473) > > at=20 > > org.apache.commons.collections.SequencedHashMap.remove(Sequenc > > edHashMap.java:460) > > at org.apache.commons.collections.LRUMap.get(LRUMap.java:93) > > at=20 > > org.apache.commons.dbcp.datasources.SharedPoolDataSource.getUs > > erPassKey(SharedPoolDataSource.java:176) > > at=20 > > org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPo > > oledConnectionAndInfo(SharedPoolDataSource.java:165) > > ... 14 more > > > > > > > > Restarting my webserver everything is working fine again.=20 > Can't torque=20 > > re-establish a valid connection to the database by it self ? > > > > I have an heavy activity on my MSSql database, sometime I get the=20 > > following error message: Caused by: > > java.sql.SQLException: I/O Error: Connection reset > > at > > net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:797) > > at=20 > > net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStateme > > nt.java:332) > > at=20 > > net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStat > > ement.java:723) > > at=20 > > net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStat > > ement.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=20 > > connection from the pool and after losing all connection I=20 > get "Could=20 > > not retrieve connection info from pool" ? If so, do I have=20 > to create a=20 > > new connection and set it on the pool ? > > > > > > Thank you, > > > > Eduardo. > > > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org