You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Ralf Baumert <ra...@phlat-labs.de> on 2003/06/03 00:26:22 UTC

Still Problems with null connections

Hi List,

my Application still won't run properly. Since noone answered my last Mail, 
here goes another one. I really appreciate every Hint !

Ok, here's my Problem again:
I have Torque 3.0 configured like this:

torque.dsfactory.mydb.pool.defaultMaxConnections=5
torque.dsfactory.mydb.pool.maxExpiryTime=3600
torque.dsfactory.mydb.pool.connectionWaitTimeout=5

MySQL is configured to kill idle Sessions after 30 secs.

Here's what happens:
When MySQL kills the Connection I get this Error:

org.apache.torque.TorqueException
Communication link failure: java.io.IOException 

When I hit reload, Torque reconnects as wanted. Everything works fine.

Then I wait some Minutes and suddenly I get this Error:

org.apache.torque.TorqueException
Timed out waiting for pooled connection from 'null' 

There's no Message in torque.log, and no Messege in catalina.out either, so I 
fancy Torque must have lost its init Parameters. Here's what I do in my jsps:

if (! Torque.isInit()) { Torque t = new Torque(); 
t.init(getServletContext().getInitParameter("torque-path")); }
Connection con = Torque.getConnection();


This is serious. I spent a lot of time migrating my whole app to torque, and 
really like to use it with my customers, but this Error freezes my whole 
Website. After a Tomcat restart everything works fine for some time and then 
everything gets messed up ("He's dead, Jim"). 

Please help me out with this one, I've been trying for 2 Days already :-(

regards,
Ralf

Re: Still Problems with null connections

Posted by Ralf Baumert <ra...@phlat-labs.de>.
Hi Shin,

> jdbc2pool
you saved my day :o) 

With autoReconnect=true this seems to run stable.

Thanx alot & may the force be with you !

Re: Still Problems with null connections

Posted by Gabriel Bauman <ga...@bravenet.com>.
 > jdbc2pool

Woohoo, thanks for that! Everything is just peachy now.

Gabe



Re: Still Problems with null connections

Posted by Shin Ohkubo <sh...@po1.iftc.co.jp>.
Hi Ralf:

not sure if this helps but this is the jdbc2pool part of my
torque.properties.
hope this is of any help. good luck!

Shin

## Using Jdbc2Pool
torque.dsfactory.imaken.factory=\
  org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.imaken.pool.defaultMaxActive=10
torque.dsfactory.imaken.pool.testOnBorrow=true
torque.dsfactory.imaken.pool.validationQuery=SELECT 1
torque.dsfactory.imaken.connection.driver = org.gjt.mm.mysql.Driver
torque.dsfactory.imaken.connection.url =
jdbc:mysql://localhost/imaken?userUnicode=true&characterEncoding=SJIS
torque.dsfactory.imaken.connection.user = root
torque.dsfactory.imaken.connection.password = root


Re: Still Problems with null connections

Posted by Peter Courcoux <pe...@courcoux.biz>.
Ralf,

I may be wrong but it looks like you are using torques own pool
implementation. This has known problems. If I'm right, try commenting
out torques own pool in torque.properties and using the jdbc2 pool (next
section in torque.props) instead.

HTH

Peter


On Mon, 2003-06-02 at 23:26, Ralf Baumert wrote:
> Hi List,
> 
> my Application still won't run properly. Since noone answered my last Mail, 
> here goes another one. I really appreciate every Hint !
> 
> Ok, here's my Problem again:
> I have Torque 3.0 configured like this:
> 
> torque.dsfactory.mydb.pool.defaultMaxConnections=5
> torque.dsfactory.mydb.pool.maxExpiryTime=3600
> torque.dsfactory.mydb.pool.connectionWaitTimeout=5
> 
> MySQL is configured to kill idle Sessions after 30 secs.
> 
> Here's what happens:
> When MySQL kills the Connection I get this Error:
> 
> org.apache.torque.TorqueException
> Communication link failure: java.io.IOException 
> 
> When I hit reload, Torque reconnects as wanted. Everything works fine.
> 
> Then I wait some Minutes and suddenly I get this Error:
> 
> org.apache.torque.TorqueException
> Timed out waiting for pooled connection from 'null' 
> 
> There's no Message in torque.log, and no Messege in catalina.out either, so I 
> fancy Torque must have lost its init Parameters. Here's what I do in my jsps:
> 
> if (! Torque.isInit()) { Torque t = new Torque(); 
> t.init(getServletContext().getInitParameter("torque-path")); }
> Connection con = Torque.getConnection();
> 
> 
> This is serious. I spent a lot of time migrating my whole app to torque, and 
> really like to use it with my customers, but this Error freezes my whole 
> Website. After a Tomcat restart everything works fine for some time and then 
> everything gets messed up ("He's dead, Jim"). 
> 
> Please help me out with this one, I've been trying for 2 Days already :-(
> 
> regards,
> Ralf
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
-- 
Peter Courcoux <pe...@courcoux.biz>

Re: Two minor questions

Posted by Erik Price <ep...@ptc.com>.

John Dietz wrote:
> First of all, I've been very happy with Torque so far, so thanks to 
> Martin (as far as I can tell).
> 
> First question: Does anyone know what's up with the Archive for this 
> list?  It looks like it changed names several months ago and now the 
> archive link is broken (to torque-user), and if you do track down the 
> old archive (turbine-torque-user), it only goes up to February 2003.  I 
> really do like to look through the archives before I ask for help.

Seems to work fine:

http://marc.theaimsgroup.com/?l=turbine-torque-user&m=105464320309659&w=2

> Second question: I found a couple of people asking, but no conclusive 
> answer.  Am I correct in assuming that Torque does not currently support 
> outer joins?

http://marc.theaimsgroup.com/?l=turbine-torque-user&m=104023948620163&w=2

Though that isn't intended to be a final answer to your question.



Erik


Hibernate

Posted by "eCommerce Software Solns. Inc." <vi...@rogers.com>.
Hibernate


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 5/19/2003


Two minor questions

Posted by John Dietz <jo...@stonetab.com>.
First of all, I've been very happy with Torque so far, so thanks to 
Martin (as far as I can tell).

First question: Does anyone know what's up with the Archive for this 
list?  It looks like it changed names several months ago and now the 
archive link is broken (to torque-user), and if you do track down the 
old archive (turbine-torque-user), it only goes up to February 2003.  I 
really do like to look through the archives before I ask for help.

Second question: I found a couple of people asking, but no conclusive 
answer.  Am I correct in assuming that Torque does not currently 
support outer joins?

Thanks,

John Dietz


Re: Still Problems with null connections

Posted by Ralf Baumert <ra...@phlat-labs.de>.
> mysql-connector-j-3.0 as the JDBC driver, and MySQL 4.0. Ralf, what
> version of mysql are you using?

MySQL: mysql  Ver 11.15 Distrib 3.23.48, for suse-linux (i686)
JDBC: org.gjt.mm.mysql.Driver
Name/Version Mark Matthews' MySQL Driver - 2.0.14

My Provider is running an older Version of MySQL- same problem.

I already tried different Approches, but this error is not easy to reproduce. 
So I endet up padding my shoulders several times, uploaded all to my live 
system, it worked for a time and bang! whole site went down until my provider 
restarts the engine (they already hate me for requesting restarts).

Here what I tried:
- Global Servlet, init at Tomcat start to init Torque
- Try to init Torque if it isn't already inited in every jsp call
- set maxExpiryTime from 1 to 1000000 (is it secs or msecs ? I found different 
things in the docs )
- autoreconnect=true and autoreconnect=false

After some hard nights, I really lost it and patched my old 
NoPoolAndSlowButWorkingAtLeastBean in again.

Re: Still Problems with null connections

Posted by Gabriel Bauman <ga...@bravenet.com>.
> org.apache.torque.TorqueException
> Timed out waiting for pooled connection from 'null' 

I too am currently having this problem, and it has serious implications 
for my application. I'm using a recent torque-dev snapshot and mysql. 
Same issues, config, and timeframes as Ralf. I'm using 
mysql-connector-j-3.0 as the JDBC driver, and MySQL 4.0. Ralf, what 
version of mysql are you using?

Gabe