db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adkumar <a...@slb.com>
Subject Re: Possible Connection Leak
Date Tue, 01 Jul 2003 14:53:24 GMT
Travis, Robert other Torque experts,

    I too am facing the same problem. I wanted to move to jdbc2pool. 
 But I have difficulty in making it
    work. Can some one help please.

    This is part of the error message when I try to initialise Torque.

DEBUG [HttpProcessor[8080][4]] (ConvertUtils.java:363) - Convert string 
'true' to class 'boolean'
DEBUG [HttpProcessor[8080][4]] (ConvertUtils.java:371) -   Using 
converter org.apache.commons.beanutils.converters.BooleanConverter@71b4ca
DEBUG [HttpProcessor[8080][4]] (Jdbc2PoolDataSourceFactory.java:164) - 
Setting datasource property: validationQuery
DEBUG [HttpProcessor[8080][4]] (ConvertUtils.java:363) - Convert string 
'SELECT 1' to class 'java.lang.String'
DEBUG [HttpProcessor[8080][4]] (ConvertUtils.java:371) -   Using 
converter org.apache.commons.beanutils.converters.StringConverter@d21538
DEBUG [HttpProcessor[8080][4]] (Torque.java:353) - Adding a dummy entry 
for default, mapped onto test
        at org.apache.torque.Torque.initialize(Torque.java:240)
        at org.apache.torque.Torque.init(Torque.java:406)
        at org.apache.torque.Torque.init(Torque.java:386)

What am I missing.

Thanks in advance.


Here is my Torque.properties file content:

log4j.rootCategory = WARN, default
log4j.appender.default = org.apache.log4j.FileAppender
log4j.appender.default.file = torque.log
log4j.appender.default.layout = org.apache.log4j.SimpleLayout


## Using torque's old pool
##torque.dsfactory.test.connection.driver = oracle.jdbc.driver.OracleDriver
##torque.dsfactory.test.connection.url = 
##torque.dsfactory.test.connection.user = test
##torque.dsfactory.test.connection.password = test

## Using Jdbc2Pool
torque.dsfactory.test.pool.validationQuery=SELECT 1
torque.dsfactory.test.connection.driver = oracle.jdbc.driver.OracleDriver
torque.dsfactory.test.connection.url = jdbc:oracle:thin:@localhost:1521:test
torque.dsfactory.test.connection.user = test
torque.dsfactory.test.connection.password = test

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


# Determines whether the managers cache instances of the business objects.
# And also whether the MethodResultCache will really cache results.

torque.manager.useCache = true

Travis McCauley wrote:

> Robert,
> I'm running into your exact same problem. Did going to the jdbc2 pool 
> fix this?
> Travis McCauley
> University of Virginia Library
>> At first, I wasn't calling Torque at all -- I was using Jetspeed's 
>> security manager. Once the problem cropped up, I tried calling Torque 
>> directly to get a connection to test, and made sure I was returning 
>> the connection then.
>> The test code didn't make it die any sooner, though.
>> I'm going to try the jdbc2 pool.
>>> Keeney, Thomas wrote:
>>> Robert,
>>> I wrote a similar cron job for Jetspeed/Torque awhile back.  Check 
>>> your code
>>> to make sure that connections retrieved for Torque are released 
>>> after use.
>>> In older versions of Torque you have to release connections manually if
>>> you're retrieving connections from a database other than the default.
>>> Otherwise, I'd suggest you post the source or more details so we can
>>> investigate further.
>>>> We have an application based on Jetspeed that periodically (every 5 
>>>> minutes) updates the user list from another system. In testing, and 
>>>> for short terms, everything works perfectly. However, after about 
>>>> two days of continuous operation, the system can no longer make a 
>>>> connection to the local MySQL database, making it impossible for 
>>>> users to log in.
>>>> MySQL has a default limit of 100 connections. We have Torque 
>>>> configured to a limit of 10 connections at once.
>>>> It appears there's a leak in the Torque connection pool. Has anyone 
>>>> else run into this before? Any recommendations on where to start 
>>>> looking to fix it?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org

View raw message