I updated the commons-dbcp jar file and I no longer receive the errors. I will know for sure come tomorrow morning whether it is fixed or not.
Matt -----Original Message----- From: Bill Leng [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 10:58 AM To: Apache Torque Users List Subject: Re: Problems with Mysql timeout OK, here is my set up config.setProperty("torque.dsfactory.torque.factory", "org.apache.torque.dsfactory.SharedPoolDataSourceFactory"); config.setProperty("torque.dsfactory.torque.pool.maxActive", Integer.toString(50)); config.setProperty("torque.dsfactory.torque.pool.testOnBorrow", "true"); config.setProperty("torque.dsfactory.torque.pool.validationQuery", "SELECT COUNT(PKEY) FROM IX_DB_TYPES"); assume the database name is torque. if it still does not work, you need to read the torque's doc Matthew P. Reath wrote: >I fixed it after getting the log file snapshot. It is now select 1 from >Customer. I still get the list of errors and was wondering if that is >normal or if none of the settings are begin set. > >Matt > >-----Original Message----- >From: Bill Leng [mailto:[EMAIL PROTECTED] >Sent: Tuesday, February 08, 2005 10:34 AM >To: Apache Torque Users List >Subject: Re: Problems with Mysql timeout > >by reading your stack trace, your query string is > >select 1 >rather than >select 1 from sometable > >Matthew P. Reath wrote: > > > >>I did read the last email and I added your line in there, I was >>wondering about the error messages I'm getting. Are those normal? >> >>Matt >> >>-----Original Message----- >>From: Bill Leng [mailto:[EMAIL PROTECTED] >>Sent: Tuesday, February 08, 2005 10:24 AM >>To: Apache Torque Users List >>Subject: Re: Problems with Mysql timeout >> >>do you read my last email? >> >>the query string should be something like >> >>SELECT 1 FROM sometable >> >> >>Matthew P. Reath wrote: >> >> >> >> >> >>>I added those to the properties file but get the following errors in >>>the log >>>files: >>> >>>ERROR http-8080-Processor25 >>>org.apache.torque.dsfactory.AbstractDataSourceFactory - Property: >>>timeBetweenEvictionRunsMillis value: 10000 is not supported by DataSource: >>>org.apache.commons.dbcp.datasources.SharedPoolDataSource >>> >>>ERROR http-8080-Processor25 >>>org.apache.torque.dsfactory.AbstractDataSourceFactory - Property: >>>minEvictableIdleTimeMillis value: 10000 is not supported by DataSource: >>>org.apache.commons.dbcp.datasources.SharedPoolDataSource >>> >>>ERROR http-8080-Processor25 >>>org.apache.torque.dsfactory.AbstractDataSourceFactory - Property: >>>defaultMaxActive value: 10 is not supported by DataSource: >>>org.apache.commons.dbcp.datasources.SharedPoolDataSource >>> >>>ERROR http-8080-Processor25 >>>org.apache.torque.dsfactory.AbstractDataSourceFactory - Property: >>>testOnBorrow value: true is not supported by DataSource: >>>org.apache.commons.dbcp.datasources.SharedPoolDataSource >>> >>>ERROR http-8080-Processor25 >>>org.apache.torque.dsfactory.AbstractDataSourceFactory - Property: >>>validationQuery value: SELECT 1 is not supported by DataSource: >>>org.apache.commons.dbcp.datasources.SharedPoolDataSource >>> >>> >>>Any suggestions? >>> >>>Matt >>> >>> >>>-----Original Message----- >>>From: Thomas Fischer [mailto:[EMAIL PROTECTED] >>>Sent: Tuesday, February 08, 2005 9:53 AM >>>To: Apache Torque Users List >>>Subject: RE: Problems with Mysql timeout >>> >>> >>> >>> >>> >>>Hi, >>> >>>Yet another solution on the client side: Whether a connection timeout >>>can be configured depends on the connection pool you are using. If >>>you are using SharedPoolDataSource, it should be possible to tell the >>>pool to close unused connections after a certain period of time. See >>>the documentation of the setters in >>>http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbc >>>p >>>/ >>>datas >>>ources/SharedPoolDataSource.html >>> >>>All of the setters can be addressed by setting the corresponding >>>properties in the Torque runtime. >>>The setters you need should be >>>http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbc >>>p >>>/ >>>datas >>>ources/InstanceKeyDataSource.html#setTimeBetweenEvictionRunsMillis(in >>>t >>>) >>>and >>>http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbc >>>p >>>/ >>>datas >>>ources/InstanceKeyDataSource.html#setMinEvictableIdleTimeMillis(int) >>> >>>The corresponding properties are e.g. (replace somedb with your db >>>name) torque.dsfactory.somedb.pool.timeBetweenEvictionRunsMillis = >>>10000 torque.dsfactory.somedb.pool.minEvictableIdleTimeMillis = >>>100000 >>> >>> Thomas >>> >>>"Matthew P. Reath" <[EMAIL PROTECTED]> schrieb am 08.02.2005 16:07:49: >>> >>> >>> >>> >>> >>> >>> >>>>I'm developing a web-based application using Tomcat/Torque/MySQL. >>>>The problem I run into is that after 8 hours of inactivity the >>>>persistent connection Torque uses becomes invalid and I get an >>>>exception. The next >>>> >>>> >>>> >>>> >>>> >>>> >>>time >>> >>> >>> >>> >>> >>> >>>>I try it works. After another 8 hours of idle time the process repeats. >>>> >>>>I searched the internet for answers but most of them involved good >>>>programming practice to handle this situation in one's own JDBC >>>>code, I however am using Torque. >>>> >>>>Is there a way to configure Torque to handle this timeout period? >>>>I'd >>>> >>>> >>>> >>>> >>>> >>>> >>>rather >>> >>> >>> >>> >>> >>> >>>>not depend on the connection always being there in case it was >>>>dropped because of network problems or what not. Ideally I would >>>>like Torque to reconnect anytime it's connection becomes invalid or >>>>do some sort of heartbeat. >>>> >>>>Thanks, >>>>Matt >>>> >>>> >>>>-------------------------------------------------------------------- >>>>- To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >>> >>> >>> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
