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 Rafal Markut <ra...@mediawave.de> on 2006/01/25 09:24:58 UTC

Timed out waiting for pooled connection

Hello,

I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql

I get following exception:

[Tue Jan 24 09:01:05 CET 2006] -- ERROR -- Turbine.handleException: Error in
BasePeer.initTableSchema(TURBINE_USER): Timed out
 waiting for pooled connection from 'jdbc:postgresql://myip:5432/newsletter'
[Tue Jan 24 09:01:05 CET 2006] -- ERROR --
        Exception:  java.lang.Error: Error in
BasePeer.initTableSchema(TURBINE_USER): Timed out waiting for pooled
connection
from 'jdbc:postgresql://myip:5432/newsletter'
        Stack Trace follows:
        java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER):
Timed out waiting for pooled connection from 'jdbc:p
ostgresql://myip:5432/newsletter'
        at
org.apache.turbine.om.peer.BasePeer.initTableSchema(BasePeer.java:232)

Properties:
# -------------------------------------------------------------------
#
#  D A T A B A S E  S E T T I N G S
#
# -------------------------------------------------------------------
# These are your database settings.  Look in the
# org.apache.turbine.util.db.pool.* packages for more information.
# The default driver for Turbine is for MySQL.
#
# The parameters to connect to the default database.  You MUST
# configure these properly.
# -------------------------------------------------------------------

#database postgresql
database.default.driver=org.postgresql.Driver
database.default.url=jdbc:postgresql://myip:5432/newsletter
database.default.username=user
database.default.password=password

# The number of database connections to cache per ConnectionPool
# instance (specified per database).

database.default.maxConnections=24

# The amount of time (in milliseconds) that database connections will be
# cached (specified per database).
#
# Default: one hour = 60 * 60 * 1000

database.default.expiryTime=3600000

# The amount of time (in milliseconds) a connection request will have to
wait
# before a time out occurs and an error is thrown.
#
# Default: ten seconds = 10 * 1000

database.connectionWaitTimeout=20000

# The interval (in milliseconds) between which the PoolBrokerService logs
# the status of it's ConnectionPools.
#
# Default: No logging = 0 = 0 * 1000

database.logInterval=0

# These are the supported JDBC drivers and their associated Turbine
# adaptor.  These properties are used by the DBFactory.  You can add
# all the drivers you want here.

database.adaptor=DBPostgres
database.adaptor.DBPostgres=org.postgresql.Driver

# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.

database.idbroker.cleverquantity=true


My application works but sometimes comes that exception and I cannot perform
any db-operation - I cannot even loggin.
When I restart tomcat then it works again but not long time.

It seems that it doesn't close the connection properly.
The application was before on diffrent server and sometimes I saw this
exception in the log files - but it didn't really disturb (I could work on
the application).
During the weekend I moved this application on diffrent server and this
occures more often and stronger (that I cannot even to loggin).
It cannot be amount of new connections - before even with bigger traffic it
didn't occur.

Does anyone know what can I do ?

with best regards,
Rafal 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Timed out waiting for pooled connection

Posted by Rafal Markut <ra...@mediawave.de>.
Hello,

I wanted to migrate but I added into my tomcat configuration: 
JAVA_OPTS="-Xmx512m -Xms256m -Xss2048k"
and it works perfectly now.

with best regards,
Rafal

----- Original Message ----- 
From: "Andrea Papotti" <pa...@adigitali.it>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Wednesday, January 25, 2006 9:43 PM
Subject: Re: Timed out waiting for pooled connection


> Rafal Markut ha scritto:
>
>> Hello,
>>
>> I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql
>>
>> Does anyone know what can I do ?
>>
>> with best regards,
>> Rafal
>>
> I had the same problem about three years ago. It is a bug of Turbine 2.1's 
> torque.
> After _many_ tries, my final solution was to upgrade to 2.2 version of 
> turbine.
>
> I have currently three commercial applications working with Turbine 2.2 
> without any problem.
> If I remembr correctly, the migration from 2.1 to 2.2 was almost straight, 
> if one follows the istruction
> on the turbine site.
>
> Note: I was (an I am) using MySQL. I think that it does not make the 
> difference, but...
>
> Andrea Papotti
> Alchimie Digitali S.r.l.
>
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Timed out waiting for pooled connection

Posted by Andrea Papotti <pa...@adigitali.it>.
Rafal Markut ha scritto:

> Hello,
>
> I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql
>
> Does anyone know what can I do ?
>
> with best regards,
> Rafal
>
I had the same problem about three years ago. It is a bug of Turbine 
2.1's torque.
After _many_ tries, my final solution was to upgrade to 2.2 version of 
turbine.

I have currently three commercial applications working with Turbine 2.2 
without any problem.
If I remembr correctly, the migration from 2.1 to 2.2 was almost 
straight, if one follows the istruction
on the turbine site.

Note: I was (an I am) using MySQL. I think that it does not make the 
difference, but...

Andrea Papotti
Alchimie Digitali S.r.l.




---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Timed out waiting for pooled connection

Posted by Thomas Fischer <fi...@seitenbau.net>.



Sorry, I do not have any experience at all with pre-3.1 Torque. Cannot help
you there, I'm afraid.
It seems in Turbine 2.1 Torque is not even decoupled from Turbine (i.e it
is pre-3.0 Torque)... Very antique...

      Thomas

"Rafal Markut" <ra...@mediawave.de> schrieb am 25.01.2006 11:39:46:

> Hi,
>
> > Sorry I can give you no more help, but I would giess you will either
have
> > to dig in old mail archives, look at the source code yourself or
upgrade
> > to
> > a new version. I never heard of such problems using the (new) dbcp
> > connection pool; maybe you can also trick the old Torque version into
> > using
> > it.
>
> I think that using other connection pool would be the best solution.
> Could you give me some hints about changing the connection pool ?
> Do I have to do some "tricks" or it's very easy ? (i.e. just copy jar and

> change classes name in the property file)
>
> with best regards,
> Rafal
>
> >
> >     Thomas
> >
> > "Rafal Markut" <ra...@mediawave.de> schrieb am 25.01.2006
09:24:58:
> >
> >> Hello,
> >>
> >> I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql
> >>
> >> I get following exception:
> >>
> >> [Tue Jan 24 09:01:05 CET 2006] -- ERROR -- Turbine.handleException:
Error
> > in
> >> BasePeer.initTableSchema(TURBINE_USER): Timed out
> >>  waiting for pooled connection from
> > 'jdbc:postgresql://myip:5432/newsletter'
> >> [Tue Jan 24 09:01:05 CET 2006] -- ERROR --
> >>         Exception:  java.lang.Error: Error in
> >> BasePeer.initTableSchema(TURBINE_USER): Timed out waiting for pooled
> >> connection
> >> from 'jdbc:postgresql://myip:5432/newsletter'
> >>         Stack Trace follows:
> >>         java.lang.Error: Error in
BasePeer.initTableSchema(TURBINE_USER):
> >> Timed out waiting for pooled connection from 'jdbc:p
> >> ostgresql://myip:5432/newsletter'
> >>         at
> >> org.apache.turbine.om.peer.BasePeer.initTableSchema(BasePeer.java:232)
> >>
> >> Properties:
> >> # -------------------------------------------------------------------
> >> #
> >> #  D A T A B A S E  S E T T I N G S
> >> #
> >> # -------------------------------------------------------------------
> >> # These are your database settings.  Look in the
> >> # org.apache.turbine.util.db.pool.* packages for more information.
> >> # The default driver for Turbine is for MySQL.
> >> #
> >> # The parameters to connect to the default database.  You MUST
> >> # configure these properly.
> >> # -------------------------------------------------------------------
> >>
> >> #database postgresql
> >> database.default.driver=org.postgresql.Driver
> >> database.default.url=jdbc:postgresql://myip:5432/newsletter
> >> database.default.username=user
> >> database.default.password=password
> >>
> >> # The number of database connections to cache per ConnectionPool
> >> # instance (specified per database).
> >>
> >> database.default.maxConnections=24
> >>
> >> # The amount of time (in milliseconds) that database connections will
be
> >> # cached (specified per database).
> >> #
> >> # Default: one hour = 60 * 60 * 1000
> >>
> >> database.default.expiryTime=3600000
> >>
> >> # The amount of time (in milliseconds) a connection request will have
to
> >> wait
> >> # before a time out occurs and an error is thrown.
> >> #
> >> # Default: ten seconds = 10 * 1000
> >>
> >> database.connectionWaitTimeout=20000
> >>
> >> # The interval (in milliseconds) between which the PoolBrokerService
logs
> >> # the status of it's ConnectionPools.
> >> #
> >> # Default: No logging = 0 = 0 * 1000
> >>
> >> database.logInterval=0
> >>
> >> # These are the supported JDBC drivers and their associated Turbine
> >> # adaptor.  These properties are used by the DBFactory.  You can add
> >> # all the drivers you want here.
> >>
> >> database.adaptor=DBPostgres
> >> database.adaptor.DBPostgres=org.postgresql.Driver
> >>
> >> # Determines if the quantity column of the IDBroker's id_table should
> >> # be increased automatically if requests for ids reaches a high
> >> # volume.
> >>
> >> database.idbroker.cleverquantity=true
> >>
> >>
> >> My application works but sometimes comes that exception and I cannot
> > perform
> >> any db-operation - I cannot even loggin.
> >> When I restart tomcat then it works again but not long time.
> >>
> >> It seems that it doesn't close the connection properly.
> >> The application was before on diffrent server and sometimes I saw this
> >> exception in the log files - but it didn't really disturb (I could
work
> > on
> >> the application).
> >> During the weekend I moved this application on diffrent server and
this
> >> occures more often and stronger (that I cannot even to loggin).
> >> It cannot be amount of new connections - before even with bigger
traffic
> > it
> >> didn't occur.
> >>
> >> Does anyone know what can I do ?
> >>
> >> with best regards,
> >> Rafal
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Timed out waiting for pooled connection

Posted by Rafal Markut <ra...@mediawave.de>.
Hi,

> Sorry I can give you no more help, but I would giess you will either have
> to dig in old mail archives, look at the source code yourself or upgrade 
> to
> a new version. I never heard of such problems using the (new) dbcp
> connection pool; maybe you can also trick the old Torque version into 
> using
> it.

I think that using other connection pool would be the best solution.
Could you give me some hints about changing the connection pool ?
Do I have to do some "tricks" or it's very easy ? (i.e. just copy jar and 
change classes name in the property file)

with best regards,
Rafal

>
>     Thomas
>
> "Rafal Markut" <ra...@mediawave.de> schrieb am 25.01.2006 09:24:58:
>
>> Hello,
>>
>> I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql
>>
>> I get following exception:
>>
>> [Tue Jan 24 09:01:05 CET 2006] -- ERROR -- Turbine.handleException: Error
> in
>> BasePeer.initTableSchema(TURBINE_USER): Timed out
>>  waiting for pooled connection from
> 'jdbc:postgresql://myip:5432/newsletter'
>> [Tue Jan 24 09:01:05 CET 2006] -- ERROR --
>>         Exception:  java.lang.Error: Error in
>> BasePeer.initTableSchema(TURBINE_USER): Timed out waiting for pooled
>> connection
>> from 'jdbc:postgresql://myip:5432/newsletter'
>>         Stack Trace follows:
>>         java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER):
>> Timed out waiting for pooled connection from 'jdbc:p
>> ostgresql://myip:5432/newsletter'
>>         at
>> org.apache.turbine.om.peer.BasePeer.initTableSchema(BasePeer.java:232)
>>
>> Properties:
>> # -------------------------------------------------------------------
>> #
>> #  D A T A B A S E  S E T T I N G S
>> #
>> # -------------------------------------------------------------------
>> # These are your database settings.  Look in the
>> # org.apache.turbine.util.db.pool.* packages for more information.
>> # The default driver for Turbine is for MySQL.
>> #
>> # The parameters to connect to the default database.  You MUST
>> # configure these properly.
>> # -------------------------------------------------------------------
>>
>> #database postgresql
>> database.default.driver=org.postgresql.Driver
>> database.default.url=jdbc:postgresql://myip:5432/newsletter
>> database.default.username=user
>> database.default.password=password
>>
>> # The number of database connections to cache per ConnectionPool
>> # instance (specified per database).
>>
>> database.default.maxConnections=24
>>
>> # The amount of time (in milliseconds) that database connections will be
>> # cached (specified per database).
>> #
>> # Default: one hour = 60 * 60 * 1000
>>
>> database.default.expiryTime=3600000
>>
>> # The amount of time (in milliseconds) a connection request will have to
>> wait
>> # before a time out occurs and an error is thrown.
>> #
>> # Default: ten seconds = 10 * 1000
>>
>> database.connectionWaitTimeout=20000
>>
>> # The interval (in milliseconds) between which the PoolBrokerService logs
>> # the status of it's ConnectionPools.
>> #
>> # Default: No logging = 0 = 0 * 1000
>>
>> database.logInterval=0
>>
>> # These are the supported JDBC drivers and their associated Turbine
>> # adaptor.  These properties are used by the DBFactory.  You can add
>> # all the drivers you want here.
>>
>> database.adaptor=DBPostgres
>> database.adaptor.DBPostgres=org.postgresql.Driver
>>
>> # Determines if the quantity column of the IDBroker's id_table should
>> # be increased automatically if requests for ids reaches a high
>> # volume.
>>
>> database.idbroker.cleverquantity=true
>>
>>
>> My application works but sometimes comes that exception and I cannot
> perform
>> any db-operation - I cannot even loggin.
>> When I restart tomcat then it works again but not long time.
>>
>> It seems that it doesn't close the connection properly.
>> The application was before on diffrent server and sometimes I saw this
>> exception in the log files - but it didn't really disturb (I could work
> on
>> the application).
>> During the weekend I moved this application on diffrent server and this
>> occures more often and stronger (that I cannot even to loggin).
>> It cannot be amount of new connections - before even with bigger traffic
> it
>> didn't occur.
>>
>> Does anyone know what can I do ?
>>
>> with best regards,
>> Rafal
>>
>>
>> ---------------------------------------------------------------------
>> 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


RE: Timed out waiting for pooled connection

Posted by Thomas Fischer <fi...@seitenbau.net>.



Hi,

It seems that this is a really old version of Torque using the old Torque
connection pool. The old pool was rumoured to be buggy and it is not in use
anymore. I would guess that this is one of the bugs. It looks like being a
thread-safety issue.

Sorry I can give you no more help, but I would giess you will either have
to dig in old mail archives, look at the source code yourself or upgrade to
a new version. I never heard of such problems using the (new) dbcp
connection pool; maybe you can also trick the old Torque version into using
it.

     Thomas

"Rafal Markut" <ra...@mediawave.de> schrieb am 25.01.2006 09:24:58:

> Hello,
>
> I use Turbine 2.1 with Torque, Tomcat 5.x and postgresql
>
> I get following exception:
>
> [Tue Jan 24 09:01:05 CET 2006] -- ERROR -- Turbine.handleException: Error
in
> BasePeer.initTableSchema(TURBINE_USER): Timed out
>  waiting for pooled connection from
'jdbc:postgresql://myip:5432/newsletter'
> [Tue Jan 24 09:01:05 CET 2006] -- ERROR --
>         Exception:  java.lang.Error: Error in
> BasePeer.initTableSchema(TURBINE_USER): Timed out waiting for pooled
> connection
> from 'jdbc:postgresql://myip:5432/newsletter'
>         Stack Trace follows:
>         java.lang.Error: Error in BasePeer.initTableSchema(TURBINE_USER):
> Timed out waiting for pooled connection from 'jdbc:p
> ostgresql://myip:5432/newsletter'
>         at
> org.apache.turbine.om.peer.BasePeer.initTableSchema(BasePeer.java:232)
>
> Properties:
> # -------------------------------------------------------------------
> #
> #  D A T A B A S E  S E T T I N G S
> #
> # -------------------------------------------------------------------
> # These are your database settings.  Look in the
> # org.apache.turbine.util.db.pool.* packages for more information.
> # The default driver for Turbine is for MySQL.
> #
> # The parameters to connect to the default database.  You MUST
> # configure these properly.
> # -------------------------------------------------------------------
>
> #database postgresql
> database.default.driver=org.postgresql.Driver
> database.default.url=jdbc:postgresql://myip:5432/newsletter
> database.default.username=user
> database.default.password=password
>
> # The number of database connections to cache per ConnectionPool
> # instance (specified per database).
>
> database.default.maxConnections=24
>
> # The amount of time (in milliseconds) that database connections will be
> # cached (specified per database).
> #
> # Default: one hour = 60 * 60 * 1000
>
> database.default.expiryTime=3600000
>
> # The amount of time (in milliseconds) a connection request will have to
> wait
> # before a time out occurs and an error is thrown.
> #
> # Default: ten seconds = 10 * 1000
>
> database.connectionWaitTimeout=20000
>
> # The interval (in milliseconds) between which the PoolBrokerService logs
> # the status of it's ConnectionPools.
> #
> # Default: No logging = 0 = 0 * 1000
>
> database.logInterval=0
>
> # These are the supported JDBC drivers and their associated Turbine
> # adaptor.  These properties are used by the DBFactory.  You can add
> # all the drivers you want here.
>
> database.adaptor=DBPostgres
> database.adaptor.DBPostgres=org.postgresql.Driver
>
> # Determines if the quantity column of the IDBroker's id_table should
> # be increased automatically if requests for ids reaches a high
> # volume.
>
> database.idbroker.cleverquantity=true
>
>
> My application works but sometimes comes that exception and I cannot
perform
> any db-operation - I cannot even loggin.
> When I restart tomcat then it works again but not long time.
>
> It seems that it doesn't close the connection properly.
> The application was before on diffrent server and sometimes I saw this
> exception in the log files - but it didn't really disturb (I could work
on
> the application).
> During the weekend I moved this application on diffrent server and this
> occures more often and stronger (that I cannot even to loggin).
> It cannot be amount of new connections - before even with bigger traffic
it
> didn't occur.
>
> Does anyone know what can I do ?
>
> with best regards,
> Rafal
>
>
> ---------------------------------------------------------------------
> 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