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 17:57:03 GMT
Thanks, you are right. I prefixed it with torque. Still it did not work.

Andrew helped me figure out the issue. I commented

torque.dsfactory.test.pool.validationQuery=SELECT 1

I could have done 

torque.dsfactory.test.pool.validationQuery=SELECT sysdate from dual 

too.

Thanks
Anil




Robles, Rogelio wrote:

>Doing a quick sniff test I think you need to prefix these with 'torque.'
>
>database.default=test        ===> torque.database.default=test
>database.test.adapter=oracle ===> ...
>
>Rogelio
>
>  
>
>>-----Original Message-----
>>From: adkumar [mailto:anl1@slb.com]
>>Sent: Tuesday, July 01, 2003 7:53 AM
>>To: Turbine Torque Users List
>>Subject: Re: Possible Connection Leak
>>
>>
>>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
>>java.lang.NullPointerException
>>        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.
>>
>>Anil
>>
>>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
>>
>>database.default=test
>>database.test.adapter=oracle
>>
>>## Using torque's old pool
>>##torque.dsfactory.test.factory=org.apache.torque.dsfactory.To
>>rqueDataSourceFactory
>>##torque.dsfactory.test.pool.defaultMaxConnections=10
>>##torque.dsfactory.test.pool.maxExpiryTime=3600
>>##torque.dsfactory.test.pool.connectionWaitTimeout=10
>>##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
>>##torque.database.adapter.DBOracle=oracle.jdbc.driver.OracleDriver
>>
>>
>>## Using Jdbc2Pool
>>torque.dsfactory.test.factory=org.apache.torque.dsfactory.Jdbc
>>2PoolDataSourceFactory
>>torque.dsfactory.test.pool.defaultMaxActive=30
>>torque.dsfactory.test.pool.testOnBorrow=true
>>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.
>>
>>torque.idbroker.cleverquantity=true
>>
>># 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
>>>
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>  
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message